Slackbot
01/30/2024, 8:53 PMSergio Ferragut
01/30/2024, 9:04 PMsqlJoinAlgorithm:sortMerge in the query context to reduce the memory footprint required for the joins.José Ambrosio Hernández Molina
01/30/2024, 9:10 PMSergio Ferragut
01/30/2024, 9:19 PMGian Merlino
01/30/2024, 10:06 PMsortMerge join, TooManyRowsWithSameKey should only happen if both sides of the join have a large # of rows with a particular keyGian Merlino
01/30/2024, 10:06 PMGian Merlino
01/30/2024, 10:07 PMsortMerge?José Ambrosio Hernández Molina
01/31/2024, 4:52 AM"
INSERT INTO Sales_plus
SELECT
v."__time",
--Product Dimensions
p.product_id,
p.product_name,
p.product_category,
-- Place Dimensions
l.location_id,
l.location_address,
l.location_locality,
l.location_longitude,
l.location_latitude,
-- Sales data
v.quantity,
v.sum_sales,
v.sum_amount,
v.sum_net_amount
FROM "sales" v
left JOIN product p on v.id_prod = p.product_id
left JOIN location l on v.id_location = l.location_id
PARTITIONED BY DAY
"
and this in engine MSQ keeps failing due to the error:
Error in the middleManager Task execution process exited unsuccessfully with code[3]. See middleManager logs for more details.
The ingestion logs show: "Terminating due to java.lang.OutOfMemoryError: GC overhead limit exceeded, and for more information." the SELECT query with the sql-native engine does work well.Gian Merlino
01/31/2024, 4:59 AM-XX:+HeapDumpOnOutOfMemoryError to druid.indexer.runner.javaOpts or druid.indexer.runner.javaOptsArray in the middleManager/runtime.properties. the task log would be helpful tooJosé Ambrosio Hernández Molina
01/31/2024, 5:06 AMJosé Ambrosio Hernández Molina
01/31/2024, 5:27 AMJohn Kowtko
02/01/2024, 12:24 PMselect count(*), count(distinct location_id) from location and select count(*), count(distinct product_id from product ... (and remember to uncheck the "use approx count(distinct)" box so you get exact numbers here.)
Also, have you tried pulling things out of the query to get to a simpler version of the query that does work? I.e. pull out one of the joins ... does just sales LEFT JOIN product work? Or sales LEFT JOIN location? And for your original query with Lookups, start removing lookups one at a time.Karan Kumar
02/05/2024, 5:15 PMJosé Ambrosio Hernández Molina
02/06/2024, 8:21 PM