Skip site navigation (1) Skip section navigation (2)

Re: Index not used in join.. (example included)

From: Michael Wood <esiotrot(at)gmail(dot)com>
To: Ron Arts <ron(dot)arts(at)neonova(dot)nl>
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Index not used in join.. (example included)
Date: 2009-09-18 12:38:27
Message-ID: 5a8aa6680909180538v6ee287d1g18059a3697070778@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
2009/9/18 Ron Arts <ron(dot)arts(at)neonova(dot)nl>:
> A. Kretschmer schreef:
[...]
>> You can try to force an index-scan by disabling the seq-scan (set
>> enable_seqscan='no';) and re-run the query.
>
> That does force it to use the index, but doesn't speed up my query.

Would it help to add an index on the name column of the detail table?
And maybe to make it a foreign key referencing the first table?

-- 
Michael Wood <esiotrot(at)gmail(dot)com>

In response to

Responses

pgsql-novice by date

Next:From: Michael WoodDate: 2009-09-18 12:41:09
Subject: Re: Index not used in join.. (example included)
Previous:From: Ron ArtsDate: 2009-09-18 12:21:06
Subject: Re: Index not used in join.. (example included)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group