explain.depesz.com

PostgreSQL's explain analyze made readable

Result: k9Wl

Settings
# exclusive inclusive rows x rows loops node
1. 64.763 29,842.918 ↓ 92.0 92 1

Nested Loop (cost=924,174.30..924,174.37 rows=1 width=101) (actual time=29,722.692..29,842.918 rows=92 loops=1)

  • Join Filter: (events_2019_11_03.domain_sessionid = session_campaign.domain_sessionid)
  • Rows Removed by Join Filter: 691690
2.          

CTE session_campaign

3. 4.088 25,833.004 ↓ 7,602.0 7,602 1

Group (cost=471,578.12..471,578.13 rows=1 width=48) (actual time=25,826.881..25,833.004 rows=7,602 loops=1)

  • Group Key: events_2019_11_03_1.domain_sessionid, events_2019_11_03_1.mkt_content
4. 36.072 25,828.916 ↓ 15,919.0 15,919 1

Sort (cost=471,578.12..471,578.12 rows=1 width=48) (actual time=25,826.878..25,828.916 rows=15,919 loops=1)

  • Sort Key: events_2019_11_03_1.domain_sessionid, events_2019_11_03_1.mkt_content
  • Sort Method: quicksort Memory: 2579kB
5. 10.096 25,792.844 ↓ 15,919.0 15,919 1

Gather (cost=1,000.00..471,578.11 rows=1 width=48) (actual time=2.801..25,792.844 rows=15,919 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 25,782.748 25,782.748 ↓ 5,306.0 5,306 3 / 3

Parallel Seq Scan on events_2019_11_03 events_2019_11_03_1 (cost=0.00..470,578.01 rows=1 width=48) (actual time=1.510..25,782.748 rows=5,306 loops=3)

  • Filter: ((etl_tstamp > '2018-12-18 09:16:23.667'::timestamp without time zone) AND (mkt_source = 'Facebook_HP'::text) AND ((collector_tstamp)::date >= '2019-01-01'::date) AND ((collector_tstamp)::date <= '2019-11-18'::date) AND (mkt_content = ANY ('{23843805914300702,23843998052440702,23843925558150702,23843925472240702,23843799778680702,23843665727360702,23843665718530702,23843653265140702,23843561480940702,23843301519760702,23843446745490702,23843713458150702,23843713362830702,23843713351980702,23843713349940702,23843665727310702,23843665727350702,23843665718550702,23843665718510702,23843653265130702,23843653265090702,23843535403370702,23843535390030702,23843446654770702,23843446643050702,23843301367630702,23843301362540702,23843200210870702,23843743257690702,23843743257680702}'::text[])))
  • Rows Removed by Filter: 670039
7. 0.057 29,722.736 ↓ 91.0 91 1

Group (cost=452,596.17..452,596.20 rows=1 width=69) (actual time=29,722.642..29,722.736 rows=91 loops=1)

  • Group Key: events_2019_11_03.domain_sessionid, ((((((events_2019_11_03.contexts)::json -> 'data'::text) -> 0) -> 'data'::text) ->> 'orderId'::text))
8. 0.334 29,722.679 ↓ 92.0 92 1

Sort (cost=452,596.17..452,596.18 rows=1 width=69) (actual time=29,722.639..29,722.679 rows=92 loops=1)

  • Sort Key: events_2019_11_03.domain_sessionid, ((((((events_2019_11_03.contexts)::json -> 'data'::text) -> 0) -> 'data'::text) ->> 'orderId'::text))
  • Sort Method: quicksort Memory: 32kB
9. 8.247 29,722.345 ↓ 92.0 92 1

Hash Semi Join (cost=1,000.03..452,596.16 rows=1 width=69) (actual time=25,872.418..29,722.345 rows=92 loops=1)

  • Hash Cond: (events_2019_11_03.domain_sessionid = session_campaign_1.domain_sessionid)
10. 0.109 3,876.418 ↓ 43.8 2,233 1

Gather (cost=1,000.00..452,595.98 rows=51 width=427) (actual time=7.650..3,876.418 rows=2,233 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
11. 3,876.309 3,876.309 ↓ 35.4 744 3 / 3

Parallel Seq Scan on events_2019_11_03 (cost=0.00..451,590.88 rows=21 width=427) (actual time=4.680..3,876.309 rows=744 loops=3)

  • Filter: ((etl_tstamp > '2018-12-18 09:16:23.667'::timestamp without time zone) AND ((collector_tstamp)::date >= '2019-01-01'::date) AND ((collector_tstamp)::date <= '2019-11-18'::date) AND ((((((contexts)::json -> 'data'::text) -> 0) -> 'data'::text) ->> 'eventType'::text) = 'order'::text))
  • Rows Removed by Filter: 674601
12. 1.535 25,837.680 ↓ 7,595.0 7,595 1

Hash (cost=0.02..0.02 rows=1 width=32) (actual time=25,837.680..25,837.680 rows=7,595 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 576kB
13. 25,836.145 25,836.145 ↓ 7,602.0 7,602 1

CTE Scan on session_campaign session_campaign_1 (cost=0.00..0.02 rows=1 width=32) (actual time=25,826.887..25,836.145 rows=7,602 loops=1)

14. 55.419 55.419 ↓ 7,602.0 7,602 91

CTE Scan on session_campaign (cost=0.00..0.02 rows=1 width=64) (actual time=0.000..0.609 rows=7,602 loops=91)