Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 93788475876 for ; Fri, 5 Apr 2002 10:53:44 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g35FrhF24468; Fri, 5 Apr 2002 10:53:43 -0500 (EST) To: nickf@ontko.com Cc: "pgsql-admin" Subject: Re: A plan returned by explain doesn't make sense to me In-reply-to: References: Comments: In-reply-to "Nick Fankhauser" message dated "Fri, 05 Apr 2002 08:48:58 -0500" Date: Fri, 05 Apr 2002 10:53:42 -0500 Message-ID: <24465.1018022022@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200204/60 X-Sequence-Number: 3949 "Nick Fankhauser" 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