explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sHQ

Settings
# exclusive inclusive rows x rows loops node
1. 23.331 195.963 ↓ 1,720.0 1,720 1

Nested Loop (cost=247.00..4,539.35 rows=1 width=62) (actual time=17.685..195.963 rows=1,720 loops=1)

  • Join Filter: ((p.partyid = a.siteid) AND (p.ownerpartyid = a.account_id))
2. 14.841 69.480 ↓ 36.7 14,736 1

Hash Join (cost=246.59..2,944.96 rows=401 width=43) (actual time=4.084..69.480 rows=14,736 loops=1)

  • Hash Cond: ((t.siteid = p.partyid) AND (t.account_id = p.ownerpartyid))
3. 50.634 50.634 ↓ 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.060..50.634 rows=18,869 loops=1)

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

Hash (cost=222.38..222.38 rows=1,614 width=8) (actual time=4.005..4.005 rows=1,614 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 80kB
5. 3.400 3.400 ↑ 1.0 1,614 1

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

  • Filter: ((servicename)::text = '17005'::text)
  • Rows Removed by Filter: 4584
6. 103.152 103.152 ↓ 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.007..0.007 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.464 ms
Execution time : 196.464 ms