explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YK5e : without group by

Settings
# exclusive inclusive rows x rows loops node
1. 222.153 218,781.632 ↑ 1.0 100,000 1

Sort (cost=1,493,949,315.40..1,493,949,565.40 rows=100,000 width=154) (actual time=218,763.919..218,781.632 rows=100,000 loops=1)

  • Sort Key: batch_search.batch_date DESC, batch_search_query.query_number
  • Sort Method: external merge Disk: 15080kB
2. 199.327 218,559.479 ↑ 1.0 100,000 1

Hash Join (cost=4.50..1,493,933,146.08 rows=100,000 width=154) (actual time=13.160..218,559.479 rows=100,000 loops=1)

  • Hash Cond: (batch_search_query.search_uuid = batch_search.uuid)
3. 59.845 59.845 ↑ 1.0 100,000 1

Seq Scan on batch_search_query (cost=0.00..2,031.00 rows=100,000 width=54) (actual time=0.029..59.845 rows=100,000 loops=1)

4. 0.123 0.307 ↑ 1.0 100 1

Hash (cost=3.25..3.25 rows=100 width=121) (actual time=0.307..0.307 rows=100 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 22kB
5. 0.184 0.184 ↑ 1.0 100 1

Seq Scan on batch_search (cost=0.00..3.25 rows=100 width=121) (actual time=0.043..0.184 rows=100 loops=1)

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

SubPlan (forHash Join)

7. 63,200.000 218,300.000 ↑ 1.0 1 100,000

Aggregate (cost=14,939.30..14,939.31 rows=1 width=8) (actual time=2.182..2.183 rows=1 loops=100,000)

8. 110,500.000 155,100.000 ↑ 1.0 10,000 100,000

Bitmap Heap Scan on batch_search_result (cost=457.93..14,914.30 rows=10,000 width=0) (actual time=0.455..1.551 rows=10,000 loops=100,000)

  • Recheck Cond: (search_uuid = batch_search.uuid)
  • Heap Blocks: exact=15477000
9. 44,600.000 44,600.000 ↑ 1.0 10,000 100,000

Bitmap Index Scan on batch_search_result_uuid (cost=0.00..455.43 rows=10,000 width=0) (actual time=0.446..0.446 rows=10,000 loops=100,000)

  • Index Cond: (search_uuid = batch_search.uuid)
Planning time : 1.890 ms
Execution time : 218,798.605 ms