Re: A plan returned by explain doesn't make sense to me

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nickf(at)ontko(dot)com
Cc: "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: A plan returned by explain doesn't make sense to me
Date: 2002-04-05 15:53:42
Message-ID: 24465.1018022022@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Nick Fankhauser" <nickf(at)ontko(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Young 2002-04-05 16:18:07 Data Files
Previous Message Nick Fankhauser 2002-04-05 14:33:18 error in my last post