You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Daniel John Debrunner <dj...@debrunners.com> on 2005/08/03 06:43:07 UTC

Functional indexes WAS Re: jira question

Manish Khettry wrote:

> On 8/1/05, Mike Matrigali <mi...@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.