explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r7G2

Settings
# exclusive inclusive rows x rows loops node
1. 1.636 118.432 ↑ 1.0 1 1

Group (cost=32,470.52..100,344.63 rows=1 width=8) (actual time=110.266..118.432 rows=1 loops=1)

  • Group Key: c.customerid
2. 2.674 116.796 ↓ 1.0 20,976 1

Nested Loop (cost=32,470.52..100,293.27 rows=20,544 width=8) (actual time=110.264..116.796 rows=20,976 loops=1)

3. 0.026 0.026 ↑ 1.0 1 1

Seq Scan on customers c (cost=0.00..7.12 rows=1 width=8) (actual time=0.004..0.026 rows=1 loops=1)

  • Filter: (customerid = 36)
  • Rows Removed by Filter: 89
4. 3.919 114.096 ↓ 1.0 20,976 1

Bitmap Heap Scan on activity_plan_metric_view temp (cost=32,470.52..100,080.70 rows=20,544 width=8) (actual time=110.257..114.096 rows=20,976 loops=1)

  • Recheck Cond: ((customer_id = 36) AND (userid = 1))
  • Heap Blocks: exact=479
5. 0.585 110.177 ↓ 0.0 0 1

BitmapAnd (cost=32,470.52..32,470.52 rows=20,544 width=0) (actual time=110.177..110.177 rows=0 loops=1)

6. 15.106 15.106 ↓ 1.0 272,688 1

Bitmap Index Scan on activity_plan_metric_view_customer_idx (cost=0.00..4,962.52 rows=268,545 width=0) (actual time=15.106..15.106 rows=272,688 loops=1)

  • Index Cond: (customer_id = 36)
7. 94.486 94.486 ↓ 1.0 1,497,162 1

Bitmap Index Scan on activity_plan_metric_view_user_idx (cost=0.00..27,497.47 rows=1,488,671 width=0) (actual time=94.486..94.486 rows=1,497,162 loops=1)

  • Index Cond: (userid = 1)