explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5rOcN

Settings
# exclusive inclusive rows x rows loops node
1. 87.413 3,180.481 ↑ 451.2 8 1

Unique (cost=17,973.47..18,049.08 rows=3,610 width=3) (actual time=3,003.113..3,180.481 rows=8 loops=1)

2. 181.368 3,093.068 ↑ 1.1 14,002 1

Sort (cost=17,973.47..18,011.27 rows=15,122 width=3) (actual time=3,003.098..3,093.068 rows=14,002 loops=1)

  • Sort Key: inspections_purchaseorder.opo_number
  • Sort Method: quicksort Memory: 826kB
3. 357.691 2,911.700 ↑ 1.1 14,002 1

Nested Loop Left Join (cost=5,353.98..16,923.67 rows=15,122 width=3) (actual time=126.304..2,911.700 rows=14,002 loops=1)

4. 1,152.761 2,315.975 ↑ 1.1 14,002 1

Hash Join (cost=5,353.56..8,606.63 rows=15,122 width=4) (actual time=126.264..2,315.975 rows=14,002 loops=1)

  • Hash Cond: (inspections_booking_purchase_orders.booking_id = inspections_booking.id)
5. 1,037.289 1,037.289 ↑ 1.0 161,880 1

Seq Scan on inspections_booking_purchase_orders (cost=0.00..2,494.80 rows=161,880 width=8) (actual time=0.270..1,037.289 rows=161,880 loops=1)

6. 57.665 125.925 ↑ 1.0 7,572 1

Hash (cost=5,255.83..5,255.83 rows=7,819 width=4) (actual time=125.919..125.925 rows=7,572 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 331kB
7. 67.538 68.260 ↑ 1.0 7,572 1

Bitmap Heap Scan on inspections_booking (cost=161.50..5,255.83 rows=7,819 width=4) (actual time=1.151..68.260 rows=7,572 loops=1)

  • Recheck Cond: ((book_to_org_id = 291715) OR (executor_id = 291715) OR (book_from_org_id = 291715))
  • Filter: ((status)::text = ANY ('{upcoming,new,waived,confirmed,rejected,merged}'::text[]))
  • Heap Blocks: exact=3624
8. 0.020 0.722 ↓ 0.0 0 1

BitmapOr (cost=161.50..161.50 rows=7,835 width=0) (actual time=0.716..0.722 rows=0 loops=1)

9. 0.027 0.027 ↑ 1.4 81 1

Bitmap Index Scan on inspections_booking_book_to_org_id_272973e0 (cost=0.00..5.12 rows=110 width=0) (actual time=0.021..0.027 rows=81 loops=1)

  • Index Cond: (book_to_org_id = 291715)
10. 0.017 0.017 ↓ 0.0 0 1

Bitmap Index Scan on inspections_booking_executor_id_bedf7882 (cost=0.00..4.79 rows=66 width=0) (actual time=0.011..0.017 rows=0 loops=1)

  • Index Cond: (executor_id = 291715)
11. 0.658 0.658 ↑ 1.0 7,572 1

Bitmap Index Scan on inspections_booking_book_from_org_id_2014663a (cost=0.00..145.73 rows=7,659 width=0) (actual time=0.652..0.658 rows=7,572 loops=1)

  • Index Cond: (book_from_org_id = 291715)
12. 238.034 238.034 ↑ 1.0 1 14,002

Index Scan using inspections_purchaseorder_pkey on inspections_purchaseorder (cost=0.42..0.54 rows=1 width=7) (actual time=0.010..0.017 rows=1 loops=14,002)

  • Index Cond: (inspections_booking_purchase_orders.purchaseorder_id = id)
Planning time : 17.787 ms