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
delete from T where T.C in (select T.C from T group by T.C having count(1) = 1) never stops [CORE2142] #2573
Comments
Commented by: @dyemanov What plan does this query use? |
Commented by: Cosmin Apreutesei (cosmin_ap2) Plan Adapted Plan .. I have no index on street_type. |
Commented by: @dyemanov Then it sounds more like a "designed pitfall" rather than a bug. In Firebird, you have to index the street_type field in order to get a good performance. |
Commented by: Cosmin Apreutesei (cosmin_ap2) I know, I just thought it's missing an opportunity for optimization since the inner select returns only 12 rows. It gets the feeling of never stopping (I killed the query after about 5 minutes) even when the inner select returns 0 rows. |
Commented by: @dyemanov This is planned for improvement, maybe in the next version. |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovFix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @dyemanovFix Version: 3.0 Beta 2 [ 10586 ] => |
Submitted by: Cosmin Apreutesei (cosmin_ap2)
Relate to CORE3518
Votes: 2
my exact query was:
delete from streets where street_type in (
select s.street_type from streets s group by s.street_type having count(1) = 1
)
the streets table gets 12 rows in the subselect, and has a total of 21000 rows.
The text was updated successfully, but these errors were encountered: