explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bwuh

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

XN Limit (cost=6,091,738,610,092.58..6,091,738,610,093.83 rows=500 width=341) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

XN Merge (cost=6,091,738,610,092.58..6,091,738,925,473.67 rows=126,152,437 width=341) (actual rows= loops=)

  • Merge Key: date(sessions.event_timestamp)
3. 0.000 0.000 ↓ 0.0

XN Network (cost=6,091,738,610,092.58..6,091,738,925,473.67 rows=126,152,437 width=341) (actual rows= loops=)

  • Send to leader
4. 0.000 0.000 ↓ 0.0

XN Sort (cost=6,091,738,610,092.58..6,091,738,925,473.67 rows=126,152,437 width=341) (actual rows= loops=)

  • Sort Key: date(sessions.event_timestamp)
5. 0.000 0.000 ↓ 0.0

XN HashAggregate (cost=5,091,642,475,254.02..5,091,721,635,908.24 rows=126,152,437 width=341) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_NONE (cost=1,961,706,582,978.22..5,091,636,483,013.26 rows=126,152,437 width=341) (actual rows= loops=)

  • Hash Cond: ("outer".session_id = ("inner".session_id)::character(36))
7. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_INNER (cost=1,961,706,537,280.95..4,169,253,541,311.98 rows=126,152,437 width=267) (actual rows= loops=)

  • Inner Dist Key: mobile_sessions.session_id
  • Hash Cond: ("outer".session_id = "inner".session_id)
8. 0.000 0.000 ↓ 0.0

XN Seq Scan on tracks (cost=0.00..3,205,734.40 rows=320,573,440 width=44) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

XN Hash (cost=1,961,706,531,194.02..1,961,706,531,194.02 rows=2,434,771 width=263) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_BOTH (cost=199,080,794,302.30..1,961,706,531,194.02 rows=2,434,771 width=263) (actual rows= loops=)

  • Outer Dist Key: mobile_sessions.device_id
  • Inner Dist Key: branch_first_campaign_app_install.app_device_id
  • Hash Cond: ("outer".device_id = "inner".app_device_id)
11. 0.000 0.000 ↓ 0.0

XN Seq Scan on "lr$6bap1upafkq5pa741i26_mobile_sessions" mobile_sessions (cost=0.00..61,871.41 rows=6,187,141 width=76) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

XN Hash (cost=199,080,794,206.24..199,080,794,206.24 rows=38,423 width=227) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

XN Hash Join DS_BCAST_INNER (cost=1,190,051.56..199,080,794,206.24 rows=38,423 width=227) (actual rows= loops=)

  • Hash Cond: ("outer".web_session_id = "inner".web_session_id)
14. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_INNER (cost=1,186,354.78..122,572,363,049.28 rows=27,766,077 width=187) (actual rows= loops=)

  • Inner Dist Key: sessions.device_id
  • Hash Cond: ((("outer".device_id)::character(36) = "inner".device_id) AND (COALESCE("outer".user_id, -1) = COALESCE("inner".user_id, -1)))
15. 0.000 0.000 ↓ 0.0

XN Seq Scan on "lr$6bnfmrv5ippgo3z103ncd_user_device_bridge" user_device_bridge (cost=0.00..2,776,607.68 rows=277,660,768 width=82) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

XN Hash (cost=1,185,435.59..1,185,435.59 rows=183,838 width=192) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

XN Hash Join DS_DIST_NONE (cost=115,504.39..1,185,435.59 rows=183,838 width=192) (actual rows= loops=)

  • Hash Cond: ("outer".session_id = "inner".web_session_id)
18. 0.000 0.000 ↓ 0.0

XN Seq Scan on raw_sessions sessions (cost=0.00..271,983.93 rows=7,766,916 width=119) (actual rows= loops=)

  • Filter: ((event_timestamp >= '2019-01-23 00:00:00'::timestamp without time zone) AND ((to_char((date_trunc('week'::text, (event_timestamp - '3 days'::interval)) + '3 days'::interval), 'YYYY-MM-DD'::text) !~~ '%2019-02-14%'::text) OR (to_char((date_trunc('week'::text, (event_timestamp - '3 days'::interval)) + '3 days'::interval), 'YYYY-MM-DD'::text) IS NULL)))
19. 0.000 0.000 ↓ 0.0

XN Hash (cost=92,403.51..92,403.51 rows=9,240,351 width=73) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

XN Seq Scan on "lr$6b1zeu0du7z1suph5w3q_branch_sessions" branch_sessions (cost=0.00..92,403.51 rows=9,240,351 width=73) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

XN Hash (cost=3,479.42..3,479.42 rows=86,941 width=80) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

XN Seq Scan on "lr$6bt7tm8ovcudw3ugxcfye_branch_first_campaign_app_install" branch_first_campaign_app_install (cost=0.00..3,479.42 rows=86,941 width=80) (actual rows= loops=)

  • Filter: ((event_timestamp >= '2019-01-23 00:00:00'::timestamp without time zone) AND ((to_char((date_trunc('week'::text, (date(event_timestamp) - '3 days'::interval)) + '3 days'::interval), 'YYYY-MM-DD'::text) !~~ '%2019-02-14%'::text) OR (to_char((date_trunc('week'::text, (date(event_timestamp) - '3 days'::interval)) + '3 days'::interval), 'YYYY-MM-DD'::text) IS NULL)))
23. 0.000 0.000 ↓ 0.0

XN Hash (cost=36,557.82..36,557.82 rows=3,655,782 width=74) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

XN Seq Scan on "lr$6bv62x6d0th9u957hxrif_session_level_order_facts" orders (cost=0.00..36,557.82 rows=3,655,782 width=74) (actual rows= loops=)