7 ms·
Reading about the batch optimization, I suspect there'll be trouble ahead for implementing window functions, unless those details were dropped for simplicity.
by NautilusWave 1mo ago
Reading about the batch optimization, I suspect there'll be trouble ahead for implementing window functions, unless those details were dropped for simplicity.
- malisper 1mo agoHow so? Window functions work exactly the same way. Postgres processes them one row at a time, and you can batch them the same way as you would with sum. Window functions do make parallel queries more difficult, but that's a different story.
- NautilusWave 1mo agoI guess regardless of if the calculations are batched or not, all the rows would have to be processed before the window function results could be determined.