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

SQLStatistics function does not provide information about expression indexes [ODBC58] #59

Closed
firebird-automations opened this issue Mar 6, 2009 · 5 comments

Comments

@firebird-automations
Copy link

Submitted by: Bill Oliver (verbguy)

Attachments:
OdbcFb.zip

If I create an expression index on a column, then the index information isn't retrieved through the call to SQLStatistics. Thus,

create table expressive (user_name char(20) not null);
insert into expressive values ('bob');
insert into expressive values ('tom');
insert into expressive values ('vlad');
commit;
create unique index expressive_idx on expressive computed by (lower(user_name));
commit;

The information about expressive_idx does not show up in the call to SQLStatistics.

It seems that the problem is that expression indexes don't have an entry in rdb$index_segments. Thus ln 107 in IscDbc/IscIndexInfoResultSet.cpp should be a LEFT JOIN and not an inner JOIN.

Alexander also said that if an index is based on an expression, the expression should return in COLUMN_NAME, per spec. This is column RDB$EXPRESSION_SOURCE.

Commits: e9ec288 2f98d7e

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

assignee: Alexander Potapchenko [ lightfore ]

@firebird-automations
Copy link
Author

Commented by: @alexpotapchenko

Driver for testing (Report cardinality for indexes through SQLStatistics is included)

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

Attachment: OdbcFb.zip [ 11410 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

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

resolution: Fixed [ 1 ]

Fix Version: 2.0 RC2 [ 10320 ]

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

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

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

No branches or pull requests

2 participants