explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rzaq

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

XN Limit (cost=1,170,042,990,134,302.75..1,170,042,990,134,304.00 rows=500 width=341) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

XN Merge (cost=1,170,042,990,134,302.75..1,170,043,218,041,871.00 rows=91,163,027,292 width=341) (actual rows= loops=)

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

XN Network (cost=1,170,042,990,134,302.75..1,170,043,218,041,871.00 rows=91,163,027,292 width=341) (actual rows= loops=)

  • Send to leader
4. 0.000 0.000 ↓ 0.0

XN Sort (cost=1,170,042,990,134,302.75..1,170,043,218,041,871.00 rows=91,163,027,292 width=341) (actual rows= loops=)

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

XN HashAggregate (cost=1,168,969,190,140,358.00..1,169,026,394,939,983.75 rows=91,163,027,292 width=341) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_BCAST_INNER (cost=5,317,779.81..1,168,964,859,896,561.50 rows=91,163,027,292 width=341) (actual rows= loops=)

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

XN Hash Left Join DS_BCAST_INNER (cost=5,272,082.53..499,341,543,725,964.38 rows=91,163,027,292 width=267) (actual rows= loops=)

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

XN Hash Left Join DS_BCAST_INNER (cost=1,264,914.53..5,405,733,981,388.42 rows=1,759,467,359 width=263) (actual rows= loops=)

  • Hash Cond: ("outer".app_device_id = "inner".device_id)
9. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_BCAST_INNER (cost=1,187,575.27..208,495,031,777.24 rows=27,766,077 width=227) (actual rows= loops=)

  • Hash Cond: ("outer".web_session_id = "inner".web_session_id)
10. 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)))
11. 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=)

12. 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=)

13. 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)
14. 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)))
15. 0.000 0.000 ↓ 0.0

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

16. 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=)

17. 0.000 0.000 ↓ 0.0

XN Hash (cost=976.39..976.39 rows=97,639 width=80) (actual rows= loops=)

18. 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..976.39 rows=97,639 width=80) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

XN Hash (cost=61,871.41..61,871.41 rows=6,187,141 width=76) (actual rows= loops=)

20. 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=)

21. 0.000 0.000 ↓ 0.0

XN Hash (cost=3,205,734.40..3,205,734.40 rows=320,573,440 width=44) (actual rows= loops=)

22. 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=)

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=)