explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 38US : blah

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=222,818.83..222,818.88 rows=1 width=188) (actual rows= loops=)

  • Group Key: s.date, (lower((s.channel_grouping)::text)), (lower((s.device_category)::text)), (lower((s.user_type)::text)), (lower((ev.event_action)::text)), (lower((COALESCE(ev.event_label, 'na'::character varying))::text)), ev.zero_val_product, ev.download
2.          

CTE filter_sessions

3. 0.000 0.000 ↓ 0.0

Index Scan using sessions_date_idx on sessions (cost=0.56..2.78 rows=1 width=76) (actual rows= loops=)

  • Index Cond: ((date >= '2020-02-06'::date) AND (date <= '2020-02-06'::date))
4.          

CTE ee

5. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=47,604.61..47,606.29 rows=48 width=38) (actual rows= loops=)

  • Group Key: e.dimension1, e.dimension3
6. 0.000 0.000 ↓ 0.0

Sort (cost=47,604.61..47,604.73 rows=48 width=51) (actual rows= loops=)

  • Sort Key: e.dimension1, e.dimension3
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..47,603.27 rows=48 width=51) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

CTE Scan on filter_sessions f (cost=0.00..0.02 rows=1 width=32) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using ecom_dimension1_idx on ecom e (cost=0.56..47,602.77 rows=48 width=51) (actual rows= loops=)

  • Index Cond: ((dimension1)::text = (f.dimension1)::text)
10.          

CTE ecom_events

11. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.68..175,209.67 rows=1 width=60) (actual rows= loops=)

  • Hash Cond: (((ev_1.dimension1)::text = (ee.dimension1)::text) AND (ev_1.dimension3 = ee.dimension3))
12. 0.000 0.000 ↓ 0.0

Seq Scan on events ev_1 (cost=0.00..150,210.69 rows=3,332,973 width=52) (actual rows= loops=)

  • Filter: ((event_category)::text = 'ecom'::text)
13. 0.000 0.000 ↓ 0.0

Hash (cost=0.96..0.96 rows=48 width=48) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

CTE Scan on ee (cost=0.00..0.96 rows=48 width=48) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Sort (cost=0.08..0.08 rows=1 width=236) (actual rows= loops=)

  • Sort Key: s.date, (lower((s.channel_grouping)::text)), (lower((s.device_category)::text)), (lower((s.user_type)::text)), (lower((ev.event_action)::text)), (lower((COALESCE(ev.event_label, 'na'::character varying))::text)), ev.zero_val_product, ev.download
16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..0.07 rows=1 width=236) (actual rows= loops=)

  • Join Filter: ((s.dimension1)::text = (ev.dimension1)::text)
17. 0.000 0.000 ↓ 0.0

CTE Scan on filter_sessions s (cost=0.00..0.02 rows=1 width=164) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

CTE Scan on ecom_events ev (cost=0.00..0.02 rows=1 width=104) (actual rows= loops=)