Re: Index not used in join.. (example included) - Mailing list pgsql-novice

From Michael Wood
Subject Re: Index not used in join.. (example included)
Date
Msg-id [email protected]
Whole thread Raw
In response to Index not used in join.. (example included)  (Ron Arts <[email protected]>)
Responses Re: Index not used in join.. (example included)
List pgsql-novice
2009/9/18 Michael Wood <[email protected]>:
> 2009/9/18 Ron Arts <[email protected]>:
>> 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?

Sorry, I just had another look and see you do have an index on the
name column in detail.

I wonder if it would make a difference if the index on the first table
was a unique index.

--
Michael Wood <[email protected]>

pgsql-novice by date:

Previous
From: Michael Wood
Date:
Subject: Re: Index not used in join.. (example included)
Next
From: Ron Arts
Date:
Subject: Re: Index not used in join.. (example included)