explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6JxP

Settings
# exclusive inclusive rows x rows loops node
1. 437.241 4,472.876 ↑ 15.5 6 1

Unique (cost=720,066.04..720,443.75 rows=93 width=7) (actual time=3,598.608..4,472.876 rows=6 loops=1)

2. 961.546 4,035.635 ↑ 1.1 67,708 1

Sort (cost=720,066.04..720,254.90 rows=75,542 width=7) (actual time=3,598.592..4,035.635 rows=67,708 loops=1)

  • Sort Key: inspections_inspectiontype.code
  • Sort Method: external merge Disk: 952kB
3. 889.951 3,074.089 ↑ 1.1 67,708 1

Hash Join (cost=54.17..713,945.25 rows=75,542 width=7) (actual time=1,643.073..3,074.089 rows=67,708 loops=1)

  • Hash Cond: (inspections_booking.inspection_type_id = inspections_inspectiontype.id)
4. 1,367.640 2,160.843 ↑ 1.1 67,708 1

Seq Scan on inspections_booking (cost=0.00..712,852.38 rows=75,542 width=4) (actual time=1,619.751..2,160.843 rows=67,708 loops=1)

  • Filter: ((alternatives: SubPlan 1 or hashed SubPlan 2) OR (book_to_org_id = 252437) OR (book_from_org_id = 252437) OR (executor_id = 252437))
  • Rows Removed by Filter: 15995
5.          

SubPlan (forSeq Scan)

6. 0.000 0.000 ↓ 0.0 0

Index Scan using inspections_customorgcontactlocation_pkey on inspections_customorgcontactlocation (cost=0.42..8.44 rows=1 width=0) (never executed)

  • Index Cond: (inspections_booking.retailer_information_id = id)
  • Filter: (org_id = 252437)
7. 786.245 793.203 ↓ 1.0 114,934 1

Bitmap Heap Scan on inspections_customorgcontactlocation inspections_customorgcontactlocation_1 (cost=2,147.96..10,973.47 rows=114,521 width=4) (actual time=7.906..793.203 rows=114,934 loops=1)

  • Recheck Cond: (org_id = 252437)
  • Heap Blocks: exact=7299
8. 6.958 6.958 ↓ 1.0 114,934 1

Bitmap Index Scan on inspections_customorgcontactlocation_org_id_d1e2d4e4 (cost=0.00..2,119.33 rows=114,521 width=0) (actual time=6.952..6.958 rows=114,934 loops=1)

  • Index Cond: (org_id = 252437)
9. 11.405 23.295 ↑ 1.0 1,741 1

Hash (cost=32.41..32.41 rows=1,741 width=11) (actual time=23.289..23.295 rows=1,741 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 93kB
10. 11.890 11.890 ↑ 1.0 1,741 1

Seq Scan on inspections_inspectiontype (cost=0.00..32.41 rows=1,741 width=11) (actual time=0.692..11.890 rows=1,741 loops=1)

Planning time : 14.245 ms