explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RA0c

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 3,981.602 9,263.592 ↓ 60.0 60 1

GroupAggregate (cost=5.44..5.47 rows=1 width=25) (actual time=5,136.509..9,263.592 rows=60 loops=1)

  • Group Key: cnt.planner_id, cnt.planner_campaign_id, own.planner_campaign_partner_id, cnt.tag_value
2. 761.062 5,281.990 ↓ 2,908,247.0 2,908,247 1

Sort (cost=5.44..5.45 rows=1 width=34) (actual time=5,135.444..5,281.990 rows=2,908,247 loops=1)

  • Sort Key: cnt.planner_campaign_id, own.planner_campaign_partner_id, cnt.tag_value
  • Sort Method: quicksort Memory: 297033kB
3. 1,018.563 4,520.928 ↓ 2,908,247.0 2,908,247 1

Nested Loop Left Join (cost=1.00..5.43 rows=1 width=34) (actual time=0.069..4,520.928 rows=2,908,247 loops=1)

4. 594.118 594.118 ↓ 2,908,247.0 2,908,247 1

Index Scan using wcm_contacts_idx_planner_id on wcm_contacts cnt (cost=0.57..2.79 rows=1 width=34) (actual time=0.058..594.118 rows=2,908,247 loops=1)

  • Index Cond: (planner_id = 2231473)
5. 2,908.247 2,908.247 ↓ 0.0 0 2,908,247

Index Scan using wcm_contacts_own_idx_id on wcm_contacts_own own (cost=0.42..2.64 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=2,908,247)

  • Index Cond: (id = cnt.id)
Planning time : 0.901 ms
Execution time : 9,266.804 ms