=?ISO-8859-1?Q?Tobias_Rundstr=F6m?= <[EMAIL PROTECTED]> wrote: > > create table Media (id integer, key, value, source integer); > and the indexes: > create unique index key_idx on Media (id,key,source); > create index prop_idx on Media (key,value); > create index source_idx on Media (key,source); > create index key_source_val_idx on Media (key,source,value); >
Investigating further, I see that Media.source=1 for every row in your database. What is Media.source? Does it ever have a value other than 1? Since source is always 1, there is really no point in indexing it. For the sample data set you supplied, you could just as well get by with the following two indices: CREATE UNIQUE INDEX key_idx ON media (id,key); CREATE INDEX prop_idx ON media (key,value); If in other data sets media.source takes on more a more diverse set of values, then perhaps some of the other indices above would be useful - but not in the sample data you supplied. -- D. Richard Hipp <[EMAIL PROTECTED]>

