Subject | Re: [firebird-support] Compound indexes and plans |
---|---|
Author | Ann W. Harrison |
Post date | 2006-05-25T21:06:17Z |
Rick Debay wrote:
use compound keys unless you need them for uniqueness. Firebird
does remarkably well at using multiple indexes for a single
query... OK, sometimes it used too many, but V1.5 and V2
are more moderate.
Regards,
Ann
>COL_1 and COL_2, the latter badly. Generally speaking, don't
> Given an index:
>
> CREATE ASC INDEX IDX_A ON TABLE_A (COL_1, COL_2, COL_3);
>
> SELECT 1
> FROM TABLE_A
> WHERE COL_1 = ? AND COL_2 > 0 AND COL_3 = ?
>
use compound keys unless you need them for uniqueness. Firebird
does remarkably well at using multiple indexes for a single
query... OK, sometimes it used too many, but V1.5 and V2
are more moderate.
Regards,
Ann