explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xftj

Settings
# exclusive inclusive rows x rows loops node
1. 17.303 235.800 ↓ 1,720.0 1,720 1

Nested Loop (cost=242.97..22,302.36 rows=1 width=62) (actual time=17.857..235.800 rows=1,720 loops=1)

  • Join Filter: (p.partyid = a.siteid)
2. 53.649 130.081 ↓ 3.0 14,736 1

Hash Join (cost=242.55..2,915.54 rows=4,879 width=39) (actual time=3.192..130.081 rows=14,736 loops=1)

  • Hash Cond: (t.siteid = p.partyid)
3. 73.338 73.338 ↓ 1.0 18,869 1

Seq Scan on txn_attendence t (cost=0.00..2,554.03 rows=18,712 width=35) (actual time=0.080..73.338 rows=18,869 loops=1)

  • Filter: ((month)::text = 'January'::text)
  • Rows Removed by Filter: 51373
4. 0.481 3.094 ↑ 1.0 1,614 1

Hash (cost=222.38..222.38 rows=1,614 width=4) (actual time=3.094..3.094 rows=1,614 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 73kB
5. 2.613 2.613 ↑ 1.0 1,614 1

Seq Scan on txn_party p (cost=0.00..222.38 rows=1,614 width=4) (actual time=0.010..2.613 rows=1,614 loops=1)

  • Filter: ((servicename)::text = '17005'::text)
  • Rows Removed by Filter: 4584
6. 88.416 88.416 ↓ 0.0 0 14,736

Index Scan using mst_master_data_pkey on mst_master_data a (cost=0.42..3.96 rows=1 width=93) (actual time=0.006..0.006 rows=0 loops=14,736)

  • Index Cond: (masterdata_id = t.master_employee_id)
  • Filter: (((month)::text = 'January'::text) AND (t.siteid = siteid) AND (t.account_id = account_id) AND (t.contractorid = contractorid) AND ((t.emp_code)::text = (emp_code)::text) AND ((account_id)::text = '12567'::text) AND ((year)::text = '2019':: (...)
  • Rows Removed by Filter: 1
Planning time : 2.449 ms
Execution time : 236.338 ms