Re: [GENERAL] Finding foreign keys that are missing indexes

2008-12-28 Thread Tom Lane
plu 12 writes: > Technically, would we also need to worry about constraints that are a prefix > of an index? e.g., that an index on (f1, f2) would be usable for a constraint > on (f1)? I guess you could, but it seems overly complicated for something that's just meant to locate trouble spots.

Re: [GENERAL] Finding foreign keys that are missing indexes

2008-12-28 Thread plu 12
> plu tard writes: > > I'm aware that if you create a foreign key constraint, no indexes are > > automatically created. > > I would like to find a way to programatically inspect all my foreign keys > > and identify possibly missing indexes on either table (either the table > > defining the con

Re: [GENERAL] Finding foreign keys that are missing indexes

2008-12-28 Thread Tom Lane
plu tard writes: > I'm aware that if you create a foreign key constraint, no indexes are > automatically created. > I would like to find a way to programatically inspect all my foreign keys and > identify possibly missing indexes on either table (either the table defining > the constraint or t

[GENERAL] Finding foreign keys that are missing indexes

2008-12-27 Thread plu tard
I'm aware that if you create a foreign key constraint, no indexes are automatically created. I would like to find a way to programatically inspect all my foreign keys and identify possibly missing indexes on either table (either the table defining the constraint or the table being referenced).