2 ms·
> "... like memory so the tuples can then be used by the outer queries, sharing the single result. But Athena does not do this; it doesn't materialize the CTE i
by gavinray 4y ago
> "... like memory so the tuples can then be used by the outer queries, sharing the single result. But Athena does not do this; it doesn't materialize the CTE in memory or anywhere first, it streams from producer operators to consumer operators directly, and can begin evaluating parts of the plan immediately."
That is a little mind-bending. Very cool, this is the equivalent of having something like a "Consumer<T>" and "Producer<T>" and the producer emitting tuples?
> "The query planner is in servitude to the actual storage architecture, which is much more important to understand for realizing practical optimizations."
> "... But getting them to work reliably under the design constraints of your system today is the novel part."
Great points, especially the first one which I didn't consider at all.