explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a2T2

Settings
# exclusive inclusive rows x rows loops node
1. 109.815 1,414.995 ↑ 6.7 22 1

Unique (cost=165,485.14..170,066.33 rows=148 width=21) (actual time=1,212.281..1,414.995 rows=22 loops=1)

2. 423.731 1,305.180 ↓ 1.7 1,522,492 1

Sort (cost=165,485.14..167,775.73 rows=916,239 width=21) (actual time=1,212.281..1,305.180 rows=1,522,492 loops=1)

  • Sort Key: datasource_productline.name
  • Sort Method: quicksort Memory: 119986kB
3. 283.520 881.449 ↓ 1.7 1,522,492 1

Hash Join (cost=10,620.11..74,752.90 rows=916,239 width=21) (actual time=70.768..881.449 rows=1,522,492 loops=1)

  • Hash Cond: (inspections_bookingitem.product_category_id = datasource_productcategory.id)
4. 278.106 581.544 ↓ 1.7 1,522,492 1

Hash Join (cost=8,905.86..60,440.37 rows=916,239 width=4) (actual time=54.241..581.544 rows=1,522,492 loops=1)

  • Hash Cond: (inspections_bookingitem.booking_id = inspections_booking.id)
5. 249.557 249.557 ↓ 1.0 1,671,589 1

Seq Scan on inspections_bookingitem (cost=0.00..36,212.54 rows=1,642,554 width=8) (actual time=0.113..249.557 rows=1,671,589 loops=1)

6. 11.605 53.881 ↓ 1.4 76,226 1

Hash (cost=8,227.88..8,227.88 rows=54,239 width=4) (actual time=53.881..53.881 rows=76,226 loops=1)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 3704kB
7. 42.276 42.276 ↓ 1.4 76,226 1

Seq Scan on inspections_booking (cost=0.00..8,227.88 rows=54,239 width=4) (actual time=0.074..42.276 rows=76,226 loops=1)

  • Filter: (((status)::text = ANY ('{upcoming,new,waived,confirmed,rejected,merged}'::text[])) AND ((book_to_org_id = 252437) OR (executor_id = 252437) OR (book_from_org_id = 252437)))
  • Rows Removed by Filter: 20115
8. 5.637 16.385 ↓ 1.0 32,644 1

Hash (cost=1,306.83..1,306.83 rows=32,593 width=25) (actual time=16.385..16.385 rows=32,644 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2056kB
9. 8.076 10.748 ↓ 1.0 32,644 1

Hash Join (cost=40.75..1,306.83 rows=32,593 width=25) (actual time=0.425..10.748 rows=32,644 loops=1)

  • Hash Cond: (datasource_productcategory.product_line_id = datasource_productline.id)
10. 2.341 2.341 ↓ 1.0 32,644 1

Seq Scan on datasource_productcategory (cost=0.00..817.93 rows=32,593 width=8) (actual time=0.090..2.341 rows=32,644 loops=1)

11. 0.195 0.331 ↓ 1.0 1,036 1

Hash (cost=28.11..28.11 rows=1,011 width=25) (actual time=0.331..0.331 rows=1,036 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 76kB
12. 0.136 0.136 ↓ 1.0 1,036 1

Seq Scan on datasource_productline (cost=0.00..28.11 rows=1,011 width=25) (actual time=0.004..0.136 rows=1,036 loops=1)