Issue Details (XML | Word | Printable)

Key: CORE-4460
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dmitry Yemanov
Reporter: Dmitry Yemanov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Expressions containing some built-in functions may be badly optimized

Created: 10/Jun/14 08:03 PM   Updated: 01/Jun/15 06:19 PM
Component/s: Engine
Affects Version/s: 2.1.5, 2.5.2, 2.1.5 Update 1, 2.5.2 Update 1
Fix Version/s: 2.5.3

QA Status: Done successfully


 Description  « Hide
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 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 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 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 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 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 dt.name = rpad('', 0, '')

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

The issue does not affect v3.0.

 All   Comments   Change History   Subversion Commits      Sort Order: Descending order - Click to sort in ascending order
There are no comments yet on this issue.