Subject Re: [firebird-support] Primary Key of mult. columns
Author Helen Borrie
At 03:21 PM 23/01/2004 +0000, you wrote:
>Just wondering...
>
>If I set up a PK to consist of the first two (or three or...) columns
>of a table, is each column individually indexed? That is, if I
>create a query that has a WHERE condition on, say, the second column,
>is that column individually indexed (because it is part of the PK),
>or does my query lack indexing assistance?

The leftmost column(s) only. So, in a 2-element index, the first column
can be used for a single-column search or ordering; in a 3-element index,
the first and second columns for a two-column AND search or two col
ordering in the same l-to-r order...and so on.

/hb