opteryx
opteryx copied to clipboard
✨ with temp table created materialised view
trafficstars
vs CTE which creates a plan which is inserted when called.
SELECT name, id INTO TEMPORARY [UNLOGGED] TABLE _TEMP FROM $planets; SELECT * FROM _TEMP;
Materialised view should probably be saved to disk rather than kept in memory. Could have a config setting for maximum size of materialised subqueries to keep in memory.
This will also need a setting for where to spill data to. This should be limited to file/blob stores.
Once we have the ability to spill, we can spill in other situations.