Subject | Re: [firebird-support] Computed index for case insensitive queries |
---|---|
Author | Mark Rotteveel |
Post date | 2014-08-22T08:50:12Z |
On Fri, 22 Aug 2014 01:18:17 -0500, "Caroline Beltran
caroline.d.beltran@... [firebird-support]"
<firebird-support@yahoogroups.com> wrote:
database objects. It is up to tools to implement this themselves (eg like
isql does for its extract functionality). So probably your tool doesn't
support extracting computed indices. By the looks of it, it assumes that an
index always has one or more 'index segments' (the columns of the index),
and it doesn't look at RDB$SEGMENT_COUNT (value 0 indicates computed)
and/or RDB$EXPRESSION_BLR and RDB$EXPRESSION_SOURCE in table RDB$INDICES
to determine if it is a normal or computed index.
Mark
caroline.d.beltran@... [firebird-support]"
<firebird-support@yahoogroups.com> wrote:
> I created the following computed index:performing
> CREATE INDEX IDX_FNAME ON PEOPLE COMPUTED BY (lower(fname))
>
> This works fine and instead of traversing the entire table when
> a case insensitive query, an 'index read' for matching records isnot
> performed.
>
> The question I have is that the database management utility I use does
> show the true index DDL for my computed index. This is what the utilitywhat
> shows:
>
> CREATE INDEX IDX_FNAME ON PEOPLE();
>
> Is my database management tool not showing this correctly or is this
> the Firebird server returns?Firebird server itself doesn't have any functionality to return the DDL of
database objects. It is up to tools to implement this themselves (eg like
isql does for its extract functionality). So probably your tool doesn't
support extracting computed indices. By the looks of it, it assumes that an
index always has one or more 'index segments' (the columns of the index),
and it doesn't look at RDB$SEGMENT_COUNT (value 0 indicates computed)
and/or RDB$EXPRESSION_BLR and RDB$EXPRESSION_SOURCE in table RDB$INDICES
to determine if it is a normal or computed index.
Mark