explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BiYY

Settings
# exclusive inclusive rows x rows loops node
1. 6.230 184.240 ↓ 4.0 16 1

GroupAggregate (cost=1,206.34..1,206.71 rows=4 width=517) (actual time=177.475..184.240 rows=16 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. 160.703 178.010 ↓ 1,675.5 6,702 1

Sort (cost=1,206.34..1,206.35 rows=4 width=516) (actual time=176.496..178.010 rows=6,702 loops=1)

  • Sort 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
  • Sort Method: external sort Disk: 3200kB
3. 7.924 17.307 ↓ 1,675.5 6,702 1

Nested Loop (cost=1.12..1,206.30 rows=4 width=516) (actual time=0.088..17.307 rows=6,702 loops=1)

4. 0.035 1.079 ↓ 6.0 24 1

Nested Loop Left Join (cost=0.56..307.77 rows=4 width=856) (actual time=0.061..1.079 rows=24 loops=1)

5. 0.007 0.972 ↓ 6.0 24 1

Nested Loop (cost=0.28..274.51 rows=4 width=775) (actual time=0.047..0.972 rows=24 loops=1)

6. 0.030 0.030 ↑ 1.0 1 1

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

  • Filter: ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text)
  • Rows Removed by Filter: 79
7. 0.021 0.935 ↓ 6.0 24 1

Nested Loop (cost=0.28..260.57 rows=4 width=819) (actual time=0.027..0.935 rows=24 loops=1)

8. 0.794 0.794 ↓ 2.0 24 1

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

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

Index Scan using pk_audiences on audiences (cost=0.28..7.29 rows=1 width=608) (actual time=0.005..0.005 rows=1 loops=24)

  • Index Cond: (((audience_id)::text = (audience_touchpoints.audience_id)::text) AND ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text))
10. 0.072 0.072 ↑ 1.0 1 24

Index Scan using pk_templates on templates (cost=0.28..8.30 rows=1 width=148) (actual time=0.003..0.003 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. 8.304 8.304 ↓ 279.0 279 24

Index Scan using ix_communications__audience_touchpoint_id on communications (cost=0.56..224.61 rows=1 width=77) (actual time=0.012..0.346 rows=279 loops=24)

  • Index Cond: (((audience_touchpoint_id)::text = (audience_touchpoints.audience_touchpoint_id)::text) AND ((tenant_key)::text = 'bc9b6486574055acaa73c836099c812c7130df01dadee779ccb903513dba97f1'::text))
  • Filter: ((audience_touchpoints.audience_id)::text = (audience_id)::text)