On Sat, 10 Dec 2005, Benjamin Smith wrote:
> A few questions:
>
> 1) Let's assume that I have some multipile foreign keys, and I join on three
> values. For example:
>
> Create table gangsters (
> name varchar not null,
> birthdate integer not null,
> shirtnumber integer not null,
> primary key (name, birthdate, shirtnumber);
>
> create table children (
> father_name varchar not null,
> father_bd integer not null,
> father_shirtnumber integer not null,
> birthdate integer not null,
> name varchar not null,
> foreign key (father_name, father_bd, father_shirtnumber) REFERENCES
> gangsters(name, birthdate, shirtnumber)
> );
>
> We have two table declarations, each with implicit indexes:
> 1) table gangsters has a primary_key index on name, birthdate, shirtnumber.
> 2) children has an implicit index on father_name, father_bd,
> father_shirtnumber. (right?)
AFAIK, not unless you create one.
Explain analyze output for the query would probably be useful as well.