-
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
sql: oom in ilike operator due to huge operand #89749
Comments
Reproduction:
|
@michae2 Let me know if you think the work you're planning to make query-oracle tests not halt when one of the statements errors would cover this issue? The erroring query in this case is only executed once, so I don't know if what you're planning would help this case. |
Something strange is happening here. From
So this was an OOM. I haven't been able to reproduce the OOM (or high memory usage) yet. |
Ok, here's a repro of the OOM: CREATE TABLE t (i) AS SELECT 82610433;
SELECT * FROM t WHERE 'a' ILIKE rpad('a', i); This uses something like 13 GiB on my laptop. The problem is that 82610433 is below the |
#89617 is the same but with |
In the case where there are no wildcard characters ( Even with the wildcards, there's some solution with reasonable space/time complexity because Postgres manages:
|
(Note this also reproduces on 22.1 and 21.2.) |
`eval.optimizedLikeFunc` has special cases for LIKE patterns that start and end with wildcards `%` or `_` which can be evaluated without regular expressions. Add support for patterns with no wildcards at all. Fixes: cockroachdb#91887 Assists: cockroachdb#89749 Epic: None Release note (performance improvement): Performance of the `LIKE` and `ILIKE` operators using patterns without any wildcards has been improved.
`eval.optimizedLikeFunc` has special cases for LIKE patterns that start and end with wildcards `%` or `_` which can be evaluated without regular expressions. Add support for patterns with no wildcards at all. Fixes: cockroachdb#91887 Assists: cockroachdb#89749 Epic: None Release note (performance improvement): Performance of the `LIKE` and `ILIKE` operators using patterns without any wildcards has been improved.
91895: eval: add LIKE patterns without wildcards to optimizedLikeFunc r=DrewKimball,yuzefovich a=michae2 `eval.optimizedLikeFunc` has special cases for LIKE patterns that start and end with wildcards `%` or `_` which can be evaluated without regular expressions. Add support for patterns with no wildcards at all. Fixes: #91887 Assists: #89749 Epic: None Release note (performance improvement): Performance of the `LIKE` and `ILIKE` operators using patterns without any wildcards has been improved. Co-authored-by: Michael Erickson <[email protected]>
`eval.optimizedLikeFunc` has special cases for LIKE patterns that start and end with wildcards `%` or `_` which can be evaluated without regular expressions. Add support for patterns with no wildcards at all. Fixes: cockroachdb#91887 Assists: cockroachdb#89749 Epic: None Release note (performance improvement): Performance of the `LIKE` and `ILIKE` operators using patterns without any wildcards has been improved.
Fixed by #105863 |
roachtest.unoptimized-query-oracle/disable-rules=half failed with artifacts on release-22.2 @ 2c1f4db5d31e18a718b974f992701dfee9a8cdd8:
Parameters:
ROACHTEST_cloud=gce
,ROACHTEST_cpu=4
,ROACHTEST_encrypted=false
,ROACHTEST_ssd=0
Help
See: roachtest README
See: How To Investigate (internal)
Same failure on other branches
This test on roachdash | Improve this report!
Jira issue: CRDB-20416
The text was updated successfully, but these errors were encountered: