From: Tom Lane <tgl@sss.pgh.pa.us>
To: demurcia@ockham-solutions.fr
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7593: Unexpected query result combining or and in operators
Date: Wed, 10 Oct 2012 13:17:32 -0400
Message-ID: <1197.1349889452@sss.pgh.pa.us> (raw)
In-Reply-To: <E1TLyc6-000827-0i@wrigleys.postgresql.org>
References: <E1TLyc6-000827-0i@wrigleys.postgresql.org>
demurcia@ockham-solutions.fr writes:
> After a little while (probably after the analyze), the query plan is changed
> and only 2 results are returned !
> "Merge Join (cost=33.31..39.69 rows=1 width=24)"
> " Merge Cond: (i.numero_id = n.numero_id)"
> ...
> " -> Index Only Scan using numero_pkey on numero n (cost=0.00..12.57
> rows=2 width=8)"
> " Index Cond: (numero_id = ANY ('{25393,25384}'::bigint[]))"
Yeah, there's a known bug in 9.2 with mergejoins whose inner side is an
indexscan with an =ANY condition. There's a fix here, if you're able to
apply a patch:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=f2366e584aea41b980f23fcf0a2e118efd...
Otherwise, the fix will be in 9.2.2.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, demurcia@ockham-solutions.fr
Subject: Re: BUG #7593: Unexpected query result combining or and in operators
In-Reply-To: <1197.1349889452@sss.pgh.pa.us>
References: <E1TLyc6-000827-0i@wrigleys.postgresql.org> <1197.1349889452@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox