explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HVit

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

XN Limit (cost=14,725,528,463,328.18..14,725,528,463,329.43 rows=500 width=262) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

XN Merge (cost=14,725,528,463,328.18..14,725,528,509,929.67 rows=18,640,599 width=262) (actual rows= loops=)

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

XN Network (cost=14,725,528,463,328.18..14,725,528,509,929.67 rows=18,640,599 width=262) (actual rows= loops=)

  • Send to leader
4. 0.000 0.000 ↓ 0.0

XN Sort (cost=14,725,528,463,328.18..14,725,528,509,929.67 rows=18,640,599 width=262) (actual rows= loops=)

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

XN HashAggregate (cost=13,725,514,608,521.70..13,725,526,212,294.58 rows=18,640,599 width=262) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_NONE (cost=1,856,637,557,682.66..13,725,487,447,129.29 rows=603,586,498 width=262) (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,856,637,511,985.38..9,312,275,143,831.16 rows=603,586,498 width=188) (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,856,637,482,861.99..1,856,637,482,861.99 rows=11,649,358 width=184) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

XN Hash Right Join DS_DIST_BOTH (cost=28,641,925,286.32..1,856,637,482,861.99 rows=11,649,358 width=184) (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=28,641,924,826.73..28,641,924,826.73 rows=183,838 width=148) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

XN Hash Left Join DS_DIST_INNER (cost=292,621.71..28,641,924,826.73 rows=183,838 width=148) (actual rows= loops=)

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

XN Hash Join DS_DIST_NONE (cost=291,401.22..1,147,972.07 rows=183,838 width=108) (actual rows= loops=)

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

16. 0.000 0.000 ↓ 0.0

XN Hash (cost=271,983.93..271,983.93 rows=7,766,916 width=75) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

XN Seq Scan on raw_sessions sessions (cost=0.00..271,983.93 rows=7,766,916 width=75) (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)))
18. 0.000 0.000 ↓ 0.0

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

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

20. 0.000 0.000 ↓ 0.0

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

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