Open rharding6373 opened 2 months ago
Hi @rharding6373, please add branch-* labels to identify which branch(es) this C-bug affects.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
Is this blocking anything for with testing, @rharding6373?
This kind of query is generated a lot while developing randomized testing for CDC (generating only queries with mutations). I haven't worked on it since filing this issue, and I haven't spent a lot of time looking for a workaround. Which is to say yes, it's blocking, unless I find a workaround this week.
Looks like this would require writing a new transformation rule to eliminate joins not needed by the DELETE
's WHERE
clause. I don't think this would be a trivial amount of work, and this doesn't seem like something that too many customers would run into, so unfortunately I don't think we'll be able to prioritize this soon. Any chance you can try to update the test to avoid generating this type of query?
I'll work on a workaround like you suggested.
Describe the problem
During some randomized testing I encountered a delete query that appears to hang (though it's more likely unnecessarily slow).
To Reproduce
In the explain, it looks like there are a lot of inner joins and full table scans:
Expected behavior This query seems like it could be optimized, since the query is not actually using any data from any of the
USING
tables. Then the cross joins and scans would be eliminated from the plan.Environment: This behavior exists on v23.2+ (didn't test on v23.1)
Jira issue: CRDB-41364