Re: Composite index planner issues Was: Re: Constraint exclusion oddity with composite index

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Joshua D. Drake" <jd@commandprompt.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2007-06-07T00:26:07Z
Lists: pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> Tom Lane wrote:
>> That statement seems perfectly accurate to me.

> Considering an index of a,b if I search for b I would expect that the 
> planner could use the index.

It can.  Whether it will think that's a good idea is another question
entirely, and one that seems a bit beyond the scope of the discussion
you're mentioning.

Try forcing the issue with enable_seqscan, and see what sort of
estimated and actual costs you get ...

			regards, tom lane