explain.depesz.com

PostgreSQL's explain analyze made readable

Result: js3C : 2nd optimization

Settings
# exclusive inclusive rows x rows loops node
1. 192.720 272.684 ↓ 1.0 100,000 1

Sort (cost=18,345.52..18,595.41 rows=99,957 width=146) (actual time=257.819..272.684 rows=100,000 loops=1)

  • Sort Key: batch_search.batch_date DESC, batch_search_query.query_number
  • Sort Method: external merge Disk: 14312kB
2. 53.173 79.964 ↓ 1.0 100,000 1

Hash Join (cost=23.50..2,526.58 rows=99,957 width=146) (actual time=0.687..79.964 rows=100,000 loops=1)

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

Seq Scan on batch_search_query (cost=0.00..2,229.57 rows=99,957 width=54) (actual time=0.056..26.227 rows=100,000 loops=1)

4. 0.140 0.564 ↑ 1.0 100 1

Hash (cost=22.25..22.25 rows=100 width=121) (actual time=0.563..0.564 rows=100 loops=1)

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

Seq Scan on batch_search (cost=0.00..22.25 rows=100 width=121) (actual time=0.014..0.424 rows=100 loops=1)

  • Filter: ((state)::text = 'QUEUED'::text)
Planning time : 3.019 ms
Execution time : 286.786 ms