Re: A plan returned by explain doesn't make sense to me - Mailing list pgsql-admin

From Tom Lane
Subject Re: A plan returned by explain doesn't make sense to me
Date
Msg-id 24465.1018022022@sss.pgh.pa.us
Whole thread Raw
In response to A plan returned by explain doesn't make sense to me  ("Nick Fankhauser" <nickf@ontko.com>)
Responses Re: A plan returned by explain doesn't make sense to me
List pgsql-admin
"Nick Fankhauser" <nickf@ontko.com> writes:
> The part that looks wrong to me is that on the last line of the explain, it
> is using the index "actor_case_assignment_both" (the index on
> actor_id,case_id) even though actor_id is never referenced in this query and
> and index on case_id alone is available.

That seems strange to me also, particularly if the index column ordering
is indeed actor_id,case_id and not the other way round --- without some
constraint on actor_id it shouldn't be *possible* to use such an index.
Could you send me a schema dump (pg_dump -s) for experimentation?
Also, which PG version are you using?

            regards, tom lane

pgsql-admin by date:

Previous
From: "Nick Fankhauser"
Date:
Subject: error in my last post
Next
From: Bruce Young
Date:
Subject: Data Files