explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2ZJ

Settings
# exclusive inclusive rows x rows loops node
1. 118.735 25,976.260 ↓ 2.0 69 1

GroupAggregate (cost=0.42..1,967,535,020.18 rows=35 width=36) (actual time=31.795..25,976.260 rows=69 loops=1)

  • Group Key: p.publisher_id
2. 134.190 134.190 ↑ 1.0 155,899 1

Index Scan using projects_publisher_id_idx on projects p (cost=0.42..17,909.28 rows=155,899 width=8) (actual time=0.035..134.190 rows=155,899 loops=1)

3.          

SubPlan (for GroupAggregate)

4. 3,141.442 25,723.335 ↑ 1.0 1 155,899

Aggregate (cost=12,620.45..12,620.46 rows=1 width=32) (actual time=0.165..0.165 rows=1 loops=155,899)

5. 20,422.769 21,358.163 ↑ 66.6 25 155,899

Bitmap Heap Scan on orders (cost=49.31..8,367.98 rows=1,666 width=24) (actual time=0.013..0.137 rows=25 loops=155,899)

  • Recheck Cond: (project_id = p.id)
  • Filter: (status = 1)
  • Rows Removed by Filter: 8
  • Heap Blocks: exact=3,361,562
6. 935.394 935.394 ↑ 64.6 34 155,899

Bitmap Index Scan on project_id_idx (cost=0.00..48.89 rows=2,195 width=0) (actual time=0.006..0.006 rows=34 loops=155,899)

  • Index Cond: (project_id = p.id)
7.          

SubPlan (for Aggregate)

8. 407.910 1,223.730 ↑ 1.0 1 407,910

Limit (cost=0.00..2.54 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=407,910)

9. 815.820 815.820 ↑ 1.0 1 407,910

Seq Scan on currencies (cost=0.00..2.54 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=407,910)

  • Filter: ((currencycode)::text = (orders.order_currency)::text)
  • Rows Removed by Filter: 6
Planning time : 2.320 ms
Execution time : 25,976.418 ms