db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Functional indexes WAS Re: jira question
Date Wed, 03 Aug 2005 04:43:07 GMT
Manish Khettry wrote:

> On 8/1/05, Mike Matrigali <mikem_app@sbcglobal.net> wrote:
> 
>>I still think
>>it would be nice if the optimizer could tell that an expression in
>>a where clause matched the result of the expression which generated
>>the column, otherwise indexes on the generated column aren't as interesting.
>>
> 
> 
> The expression used for the generated column must be stored in the
> data dictionary. Does derby serialize expressions? I was looking
> around in the classes in impl/sq/compile (ValueNode and such) and
> these classes don't seem to implement Formatable.

Compile nodes (and classes) are runtime only. They are never serialized
to disk and are not designed for that. Any runtime representation of a
compiled entity uses a specific class, such as RoutineAliasInfo.

An initial approach to this functional indexing may to to make the
scheme work for simple expressions, function calls on single columns,
eg. UPPER(lastname). Just getting that to work would solve most of the
typical uses and would be a good step towards a complete solution.
Handling arbitary expressions up front may be too much to bite off.

Dan.


Mime
View raw message