explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1rBX : query plan

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=1,508,535,030.36..1,508,535,275.36 rows=98,000 width=154) (actual rows= loops=)

  • Sort Key: batch_search.batch_date DESC, batch_search_query.query_number
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=4.45..1,508,519,198.92 rows=98,000 width=154) (actual rows= loops=)

  • Hash Cond: (batch_search_query.search_uuid = batch_search.uuid)
3. 0.000 0.000 ↓ 0.0

Seq Scan on batch_search_query (cost=0.00..2,236.00 rows=100,000 width=54) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash (cost=3.23..3.23 rows=98 width=121) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Seq Scan on batch_search (cost=0.00..3.23 rows=98 width=121) (actual rows= loops=)

  • Filter: ((state)::text = 'QUEUED'::text)
6.          

SubPlan (forHash Join)

7. 0.000 0.000 ↓ 0.0

Aggregate (cost=15,393.02..15,393.03 rows=1 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on batch_search_result (cost=461.59..15,365.54 rows=10,989 width=0) (actual rows= loops=)

  • Recheck Cond: (search_uuid = batch_search.uuid)
9. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on batch_search_result_uuid (cost=0.00..458.84 rows=10,989 width=0) (actual rows= loops=)

  • Index Cond: (search_uuid = batch_search.uuid)