Skip to content
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

Expressions containing some built-in functions may be badly optimized [CORE4460] #4780

Closed
firebird-automations opened this issue Jun 10, 2014 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @dyemanov

Test cases for predicates distributed into the union sub-parts:

select * from (
select rdb$relation_name from rdb$relations
union
select rdb$procedure_name from rdb$procedures
) as dt (name) where http://dt.name = ''

PLAN (DT RDB$RELATIONS INDEX (RDB$INDEX_0))
PLAN (DT RDB$PROCEDURES INDEX (RDB$INDEX_21))

select * from (
select rdb$relation_name from rdb$relations
union
select rdb$procedure_name from rdb$procedures
) as dt (name) where http://dt.name = upper('')

PLAN (DT RDB$RELATIONS INDEX (RDB$INDEX_0))
PLAN (DT RDB$PROCEDURES INDEX (RDB$INDEX_21))

select * from (
select rdb$relation_name from rdb$relations
union
select rdb$procedure_name from rdb$procedures
) as dt (name) where http://dt.name = trim('')

PLAN (DT RDB$RELATIONS INDEX (RDB$INDEX_0))
PLAN (DT RDB$PROCEDURES INDEX (RDB$INDEX_21))

select * from (
select rdb$relation_name from rdb$relations
union
select rdb$procedure_name from rdb$procedures
) as dt (name) where http://dt.name = left('', 0)

PLAN (DT RDB$RELATIONS NATURAL)
PLAN (DT RDB$PROCEDURES NATURAL)

select * from (
select rdb$relation_name from rdb$relations
union
select rdb$procedure_name from rdb$procedures
) as dt (name) where http://dt.name = minvalue('', '')

PLAN (DT RDB$RELATIONS NATURAL)
PLAN (DT RDB$PROCEDURES NATURAL)

select * from (
select rdb$relation_name from rdb$relations
union
select rdb$procedure_name from rdb$procedures
) as dt (name) where http://dt.name = rpad('', 0, '')

PLAN (DT RDB$RELATIONS NATURAL)
PLAN (DT RDB$PROCEDURES NATURAL)

The issue does not affect v3.0.

Commits: 480bd4c FirebirdSQL/fbt-repository@18ac373

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5.3 [ 10461 ]

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment