Subject RE: [firebird-support] Composite Primary Keys and Indices
Author Robert DiFalco
Thanks Dimitry, but I'm a little confused or I may not completely
understand a composite primary key or how indexing works. It *looks*
like there is a single (implicit) composite ascending index created for
the composite key. But when I query for COLUMN_OWNER_ID, I am only
searching on a single column. Why doesn't creating another index on that
single column improve performance? FWIW, I've tried it and you are
right, it does not improve performance; I just don't know why. If this
is a pain to answer feel free to point me to some resource where I can
learn about it myself, and thanks for the help.



From: Dimitry Sibiryakov [mailto:SD@...]
Sent: Wednesday, July 21, 2004 11:26 PM
Subject: Re: [firebird-support] Composite Primary Keys and Indices

On 21 Jul 2004 at 9:51, Robert DiFalco wrote:

>Say I have a composite primary key on two fields, COLUMN_OWNER_ID and
>COLUMN_CHILD_ID. Most of the time I will be search on the
>COLUMN_OWNER_ID field, do I need to create a separate index on that
>column or will the Primary Key declaration be enough?


SY, Dimitry Sibiryakov.