-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Optimization problem with COALESCE [CORE501] #852
Comments
Commented by: Alice F. Bird (firebirds) Date: 2005-03-31 14:09 There's no way to handle it better for now. |
Modified by: @pcisarWorkflow: jira [ 10525 ] => Firebird [ 14833 ] |
Modified by: @dyemanovsummary: FB1.5 and 2.0 optimizer problem => FB1.5 and 2.0 optimizer problem for COALESCE |
Commented by: @livius2 Why is no way to handle it better? |
Modified by: @asfernandesassignee: Arno Brinkman [ arnobrinkman ] => Adriano dos Santos Fernandes [ asfernandes ] status: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Beta 1 [ 10251 ] |
Modified by: @asfernandesVersion: 2.1.1 [ 10223 ] Version: 2.5 Alpha 1 [ 10224 ] Version: 2.0.4 [ 10211 ] Version: 2.1.0 [ 10041 ] Version: 1.5.5 [ 10220 ] Version: 2.0.3 [ 10200 ] Version: 2.0.2 [ 10130 ] Version: 2.0.1 [ 10090 ] Version: 1.5.4 [ 10100 ] Version: 2.0.0 [ 10091 ] summary: FB1.5 and 2.0 optimizer problem for COALESCE => Optimization problem with COALESCE |
Commented by: @asfernandes I'm attaching this test with the hope it is included on automated tests. It tests many problems I found when fixing CORE501, CORE1343 and CORE2041. |
Modified by: @asfernandesAttachment: core-501.sql [ 11030 ] |
Modified by: @asfernandes |
Commented by: @pcisar Adriano, do you by any chance still have the test script ? We lost the attachment in last tracker VM crash. |
Modified by: @asfernandesAttachment: core-501.sql [ 11931 ] |
Commented by: @asfernandes Attached. |
Commented by: @pcisar Test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: chedek (chedek)
Is duplicated by CORE1722
Relate to CORE2584
Is related to QA325
Attachments:
core-501.sql
core-501.sql
SFID: 1174021#
Submitted By: chedek
When I have 2 tables: A and B and try to execute
a query like this:
select coalesce((select b.cod from b where b.cod=a.
cod),0) from a
Plan
PLAN (B NATURAL)
PLAN (B NATURAL)
PLAN (A NATURAL)
Thus server try to execute internal select 2 times for
each row in main select. I think it happens because
server executes
coalesce(x,0) as
case when x is null then 0 else x end
...but for internal query it's not right.
Commits: 9150e6f b910161
The text was updated successfully, but these errors were encountered: