mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-26 00:00:54 +08:00
When time_bucket is compared to constant in WHERE, we also add condition on the underlying time variable (ts_transform_time_bucket_comparison). Unfortunately we only do this for plan-time constants, which prevents chunk exclusion when the interval is given by a query parameter, and a generic plan is used. This commit also tries to apply this optimization after applying the execution-time constants. This PR also enables startup exclusion based on parameterized filters.
3 lines
177 B
Plaintext
3 lines
177 B
Plaintext
Fixes: #6498 Suboptimal query plans when using time_bucket with query parameters
|
|
Thanks: @jbx1 for reporting suboptimal query plans when using time_bucket with query parameters
|