explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LGVl

Settings
# exclusive inclusive rows x rows loops node
1. 50.667 14,429.998 ↑ 1.0 1 1

Aggregate (cost=5,222,296.64..5,222,296.67 rows=1 width=0) (actual time=14,429.998..14,429.998 rows=1 loops=1)

2. 795.418 14,379.331 ↓ 1.0 741,729 1

Merge Join (cost=3,667,774.09..5,220,492.91 rows=721,490 width=0) (actual time=8,124.713..14,379.331 rows=741,729 loops=1)

  • Merge Cond: (((challans.accused_type)::text = (challan_accused.type)::text) AND (challans.id = challan_accused.challan_id))
3. 4,963.458 4,963.458 ↑ 2.9 5,326,470 1

Index Only Scan using idx_challans_accused_type_id__isactive on challans (cost=0.56..1,439,084.55 rows=15,417,419 width=10) (actual time=0.036..4,963.458 rows=5,326,470 loops=1)

  • Index Cond: (is_active = 1)
  • Heap Fetches: 2131543
4. 3,499.361 8,620.455 ↓ 1.0 2,594,849 1

Sort (cost=3,663,435.48..3,669,866.03 rows=2,572,218 width=11) (actual time=8,119.911..8,620.455 rows=2,594,849 loops=1)

  • Sort Key: challan_accused.type, challan_accused.challan_id
  • Sort Method: quicksort Memory: 219938kB
5. 4,608.679 5,121.094 ↓ 1.0 2,594,849 1

Bitmap Heap Scan on challan_accused (cost=33,332.57..3,389,563.95 rows=2,572,218 width=11) (actual time=749.228..5,121.094 rows=2,594,849 loops=1)

  • Recheck Cond: ((doc_no)::text = 'No DL'::text)
  • Heap Blocks: exact=722155
6. 512.415 512.415 ↓ 1.0 2,596,399 1

Bitmap Index Scan on idx_challan_accused_type_challan_id_prtial_docno (cost=0.00..32,689.52 rows=2,572,218 width=0) (actual time=512.415..512.415 rows=2,596,399 loops=1)

Planning time : 0.423 ms
Execution time : 14,449.654 ms