Subject Re: [firebird-support] Re: Error Message in SP
Author Helen Borrie
At 04:37 PM 25/04/2007, you wrote:
>ODS 11.0 and dialect 3
>
>I was planning on adding an INDEX as:
>
>CREATE ASC INDEX I_PIM_APPOINTMENTS_MONTH ON PIM_APPOINTMENTS COMPUTED
>BY (EXTRACT (MONTH FROM CAST (APPOINTMENT_STARTTIME AS DATE)));
>
>Since APPOINTMENT_STARTTIME has virtually no duplicate entries. Is
>that a good idea? thanks!

Not necessarily. With only 12 possible values, it won't be a very
selective index if the table is huge. It could disappoint you by
being slower than the non-indexed expression search. As always, test
your theories with a useful set of data. Nobody else can predict how
your data will behave.

./heLen