hey @rob Thank you for your help, I’m lost, I can’t run even simple queries.
profile
select player_id,
sum(duration) duration ,
count(*) sessions,
null active_days
from events
where name=‘event_name’
and environment =‘production’
group by player_id
Project [remote_0.player_id, remote_0.duration, remote_0.sessions, ? AS active_days] est_rows:10 actual_rows: 300 exec_time: 0ms start_time: 00:00:18.368 network_traffic: 5.441000 KB network_time: 0ms
Top limit:[@@SESSION.sql_select_limit
] actual_rows: 300 exec_time: 0ms
Gather partitions:all est_rows:10 alias:remote_0 actual_rows: 300 exec_time: 0ms start_time: 00:00:18.368
Project [r0.player_id, duration, CAST(COALESCE($0,0) AS SIGNED) AS sessions] est_rows:10 actual_rows: 2,986 exec_time: 0ms start_time: [00:00:18.367, 00:00:18.372] network_traffic: 72.495003 KB network_time: 0ms
Top limit:[?] actual_rows: 2,986 exec_time: 0ms
HashGroupBy [SUM(r0.duration) AS duration, SUM(r0.sessions) AS $0] groups:[r0.player_id] actual_rows: 9,405,237 exec_time: 5,918ms start_time: [00:00:04.120, 00:00:04.133] memory_usage: 1,811,677.750000 KB
TableScan r0 storage:list stream:yes table_type:sharded est_table_rows:342,682 est_filtered:342,682 exec_time: 0ms start_time: [00:00:04.120, 00:00:04.133] end_time: [00:00:18.367, 00:00:18.372]
Repartition [events.player_id, duration, sessions] AS r0 shard_key:[player_id] est_rows:342,682 est_select_cost:181,358,352 actual_rows: 14,243,582 exec_time: 596ms start_time: [00:00:04.099, 00:00:14.915] network_traffic: 382,275.406250 KB network_time: 583ms
ShuffleGroupBy [SUM(events.duration) AS duration, COUNT(*) AS sessions] groups:[events.player_id] actual_rows: 14,243,582 exec_time: 8,236ms start_time: [00:00:00.118, 00:00:00.361] memory_usage: 1,728,713.250000 KB
ColumnStoreFilter [events.environment = ? AND events.name = ?] actual_rows: 31,975,541 exec_time: 62ms start_time: [00:00:00.121, 00:00:00.368] total_rows_in: 1,191,622,339 average_filters_per_row: 1.043303 average_index_filters_per_row: 0.000000 average_bloom_filters_per_row: 0.000000
ColumnStoreScan twilightdaycare_landing.events, KEY events (environment, date_utc, name, player_id) USING CLUSTERED COLUMNSTORE table_type:sharded_columnstore est_table_rows:1,344,822,673 est_filtered:22,669,794 actual_rows: 1,195,697,360 exec_time: 2,720ms start_time: [00:00:00.077, 00:00:00.110] memory_usage: 4,194.304199 KB segments_scanned: 1,988 segments_skipped: 243 segments_fully_contained: 0
Compile Total Time: 96ms
This is the PROFILE. It’s just a group by… any idea?
This is the error I get
Memory used by MemSQL (28425.00 Mb) has reached the ‘maximum_memory’ setting (28665 Mb) on this node. Possible causes include (1) available query execution memory has been used up for table memory (in use table memory: 15852.75 Mb) and (2) the query is large and complex and requires