Nick Howden <n(dot)howden(at)eris(dot)qinetiq(dot)com> writes:
> Using postgres 7.2.3 the query planner seems to lose interest in using
> indexes when DISTINCT is used.
I don't think this is a bug. DISTINCT requires a sort step, so even
though you have a LIMIT, the planner has to plan on the basis of reading
the entire join table. The nestloop plan loses badly on that basis.
regards, tom lane
In response to
pgsql-bugs by date
|Next:||From: Theodore Petrosky||Date: 2002-11-15 12:32:43|
|Subject: new journaling system in OSX|
|Previous:||From: William||Date: 2002-11-14 14:59:29|
|Subject: 答复: [BUGS] Bug #818: There are no agg|