▲ | dspillett 14 hours ago | |
> can CTE's be used to make time series range queries easier / more performant? On their own, I'd guess likely not a lot. If a view would help, a CTE will help similarly without needing the external structure, if a correlated subquery would help, then yes similarly, especially if the pattern is repeated in the overall query. In conjunction with other things (good indexing, materialised sequences ("numbers" tables), etc.), is guess yes. Though you need to be much more specific about your data and the queries in question before I can do better than these vague guesses. |