explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 06N

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 5.339 ↓ 0.0 0 1

Limit (cost=2,010.01..2,010.33 rows=10 width=641) (actual time=5.339..5.339 rows=0 loops=1)

2. 0.001 5.338 ↓ 0.0 0 1

GroupAggregate (cost=2,010.01..2,027.95 rows=552 width=641) (actual time=5.338..5.338 rows=0 loops=1)

  • Group Key: rfq.id, bid.origin_port_id
3. 0.004 5.337 ↓ 0.0 0 1

Sort (cost=2,010.01..2,011.39 rows=552 width=586) (actual time=5.336..5.337 rows=0 loops=1)

  • Sort Key: rfq.id, bid.origin_port_id
  • Sort Method: quicksort Memory: 25kB
4. 0.281 5.333 ↓ 0.0 0 1

Hash Join (cost=1,081.04..1,984.87 rows=552 width=586) (actual time=5.332..5.333 rows=0 loops=1)

  • Hash Cond: (bid.rfq_id = rfq.id)
5. 1.298 1.298 ↑ 1.0 2,814 1

Seq Scan on bid (cost=0.00..896.43 rows=2,819 width=23) (actual time=0.020..1.298 rows=2,814 loops=1)

  • Filter: (is_active AND (NOT is_finalised))
  • Rows Removed by Filter: 229
6. 1.841 3.754 ↑ 1.0 5,000 1

Hash (cost=1,018.54..1,018.54 rows=5,000 width=571) (actual time=3.754..3.754 rows=5,000 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 1031kB
7. 1.754 1.913 ↑ 1.0 5,000 1

Bitmap Heap Scan on rfq (cost=175.04..1,018.54 rows=5,000 width=571) (actual time=0.173..1.913 rows=5,000 loops=1)

  • Recheck Cond: (rfq_plan_id = 81)
  • Heap Blocks: exact=124
8. 0.159 0.159 ↑ 1.0 5,000 1

Bitmap Index Scan on rfq_rfq_plan_id_idx (cost=0.00..173.79 rows=5,000 width=0) (actual time=0.159..0.159 rows=5,000 loops=1)

  • Index Cond: (rfq_plan_id = 81)