-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimizer not take into account expression index (even with index hinting) #83390
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Thank you for the report! We'll aim to address this soon. |
83619: opt: constrain expression indexes with IS NULL expressions r=mgartner a=mgartner The optimizer can generate constrained scans over indexes on computed columns when columns referenced in the computed column expression are held constant. Consider this example: CREATE TABLE t (a INT, v INT AS (a + 1) STORED, INDEX v_idx (v)) SELECT * FROM t WHERE a = 1 A constrained scan can be generated over `v_idx` because `v` depends on `a` and the query filter holds `a` constant. This commit lifts a restriction that prevented this optimization when columns referenced in the computed column expression were held constant to the `NULL` value. As far as I can tell, this restriction is not necessary. In fact, `@rytaft` had questioned its purpose originally, but the question was never answered: #43450 (review) By lifting this restriction, the optimizer can explore constrained scans over both indexed computed columns with `IS NULL` expressions and expression indexes with `IS NULL` expressions. Fixes #83390 Release note (performance improvement): The optimizer now explores more efficient query plans when index computed columns and expressions have `IS NULL` expressions. 84084: bazel: new versions of prebuilt `c-deps` r=srosenberg a=rickystewart Rebuild these archives to pull in `52a3a0aa8a707f9bb03802186da0c60b715ed9ce` (change to `jemalloc` to build without `MADV_FREE`). Release note: None 84088: ui: fix alignment on custom scale r=maryliag a=maryliag The check for valid options with the removal of some options on #83229 didn't took the custom values into consideration. This commit add the option back, allowing the alignment on custom values. Release note (bug fix): Custom time period selection is now aligning between Metrics and SQL Activity page. 84155: sql/schemachanger/scbuild: minor cleanup r=ajwerner a=ajwerner Improves the error handling a tad to make runtime errors and assertion failure. Fixes a typo. Release note: None Co-authored-by: Marcus Gartner <[email protected]> Co-authored-by: Ricky Stewart <[email protected]> Co-authored-by: Marylia Gutierrez <[email protected]> Co-authored-by: Andrew Werner <[email protected]>
cockroachdb version 22.1
Jira issue: CRDB-17042
The text was updated successfully, but these errors were encountered: