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

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 14:10:50
Message-ID: 15421.1253283050@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Ron Arts <ron(dot)arts(at)neonova(dot)nl> writes:
> 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.

IOW, the planner chose the right plan.  Don't complain...

I think the real answer here is that the planner thinks the table
is too small to bother with an index.  If you load up a non-toy
amount of data you might get a different plan.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Ron ArtsDate: 2009-09-18 14:27:32
Subject: Re: Index not used in join.. (example included).
Previous:From: Ron ArtsDate: 2009-09-18 13:15:15
Subject: Re: Index not used in join.. (example included)

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