Any news on when Druid might support JOIN optimiza...
# general
j
Any news on when Druid might support JOIN optimizations? For example:
Copy code
SELECT *
FROM table1 AS t1
LEFT JOIN table2 AS t2
ON t1.Id = t2.Id
WHERE t1.__time >= CURRENT_TIMESTAMP - INTERVAL '1' HOUR
AND t2.__time >= CURRENT_TIMESTAMP - INTERVAL '1' HOUR
doesn't execute because t2 has more than 1M rows. A manual optimization is possible because applying the time filter reduces that row set to about 1K:
Copy code
SELECT *
FROM table1 AS t1
LEFT JOIN (
  SELECT *
  FROM table2
  WHERE table2.__time >= CURRENT_TIMESTAMP - INTERVAL '1' HOUR
) t2 ON t1.Id = t2.Id
WHERE t1.__time >= CURRENT_TIMESTAMP - INTERVAL '1' HOUR
...but the manual optimization is... well... manual... and difficult to pull off with sql generating tools like Looker. At the very least automatically pushing a __time query down makes sense to me...