explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sMOZ

Settings
# exclusive inclusive rows x rows loops node
1. 61.339 207.989 ↑ 195.2 20 1

HashAggregate (cost=6,314.22..6,392.28 rows=3,903 width=517) (actual time=207.975..207.989 rows=20 loops=1)

  • Group Key: tenants.name, audiences.audience_id, audiences.name, audiences.full_description, audiences.any_or_all, audiences.service_status_group, (audiences.service_groups)::text, audiences.special_conditions, audience_touchpoints.audience_touchpoint_id, audience_touchpoints.name, audience_touchpoints.full_description, audience_touchpoints.is_cross_sell, (audience_touchpoints.cross_sell_priorities)::text, audience_touchpoints.wait_time, audience_touchpoints.wait_type, audience_touchpoints.trigger_event, templates.template_name, templates.template_id, templates.is_active, templates.template_type, templates.modification_date, templates.communication_category, templates.alternative_template_id, templates.no_duplication_within_days_limit, templates.days_offset_for_conversion, audiences.updated_at, audience_touchpoints.updated_at
2. 36.986 146.650 ↓ 5.1 20,098 1

Nested Loop (cost=0.84..6,041.01 rows=3,903 width=516) (actual time=6.977..146.650 rows=20,098 loops=1)

3. 0.113 1.452 ↓ 2.0 26 1

Nested Loop Left Join (cost=0.28..377.80 rows=13 width=854) (actual time=0.403..1.452 rows=26 loops=1)

  • Join Filter: (((audience_touchpoints.tenant_key)::text = (audiences.tenant_key)::text) AND ((audience_touchpoints.audience_id)::text = (audiences.audience_id)::text))
  • Rows Removed by Join Filter: 312
4. 0.007 0.387 ↓ 1.1 14 1

Nested Loop (cost=0.00..102.34 rows=13 width=628) (actual time=0.042..0.387 rows=14 loops=1)

5. 0.031 0.031 ↑ 1.0 1 1

Seq Scan on tenants (cost=0.00..13.90 rows=1 width=85) (actual time=0.018..0.031 rows=1 loops=1)

  • Filter: ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text)
  • Rows Removed by Filter: 79
6. 0.349 0.349 ↓ 1.1 14 1

Seq Scan on audiences (cost=0.00..88.31 rows=13 width=608) (actual time=0.023..0.349 rows=14 loops=1)

  • Filter: ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text)
  • Rows Removed by Filter: 765
7. 0.049 0.952 ↓ 2.0 24 14

Materialize (cost=0.28..272.75 rows=12 width=292) (actual time=0.002..0.068 rows=24 loops=14)

8. 0.025 0.903 ↓ 2.0 24 1

Nested Loop Left Join (cost=0.28..272.69 rows=12 width=292) (actual time=0.030..0.903 rows=24 loops=1)

9. 0.782 0.782 ↓ 2.0 24 1

Seq Scan on audience_touchpoints (cost=0.00..172.91 rows=12 width=211) (actual time=0.017..0.782 rows=24 loops=1)

  • Filter: ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text)
  • Rows Removed by Filter: 2612
10. 0.096 0.096 ↑ 1.0 1 24

Index Scan using pk_templates on templates (cost=0.28..8.30 rows=1 width=148) (actual time=0.004..0.004 rows=1 loops=24)

  • Index Cond: (((audience_touchpoints.template_id)::text = (template_id)::text) AND ((audience_touchpoints.tenant_key)::text = (tenant_key)::text) AND ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text))
11. 108.212 108.212 ↓ 7.3 773 26

Index Scan using ix_communications__audience_id on communications (cost=0.56..431.57 rows=106 width=74) (actual time=1.260..4.162 rows=773 loops=26)

  • Index Cond: (((audience_id)::text = (audiences.audience_id)::text) AND ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text))