Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 928BA9FB33B for ; Mon, 29 Jan 2007 09:27:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 40214-05 for ; Mon, 29 Jan 2007 09:27:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id 658569FB1DA for ; Mon, 29 Jan 2007 09:27:08 -0400 (AST) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Mon, 29 Jan 2007 08:27:07 -0500 id 00056407.45BDF62B.0000492E Date: Mon, 29 Jan 2007 08:27:06 -0500 From: Bill Moran To: arnaulist@andromeiberica.com Cc: PostgreSQL Performance Subject: Re: [OT] Very strange postgresql behaviour Message-Id: <20070129082706.0ef2df3b.wmoran@collaborativefusion.com> In-Reply-To: <45BDE6E4.9050805@andromeiberica.com> References: <45BDE6E4.9050805@andromeiberica.com> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.3.0 (GTK+ 2.10.7; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/401 X-Sequence-Number: 23002 In response to Arnau : > > I have postgresql 7.4.2 running on debian and I have the oddest > postgresql behaviour I've ever seen. > > I do the following queries: > > > espsm_asme=# select customer_app_config_id, customer_app_config_name > from customer_app_config where customer_app_config_id = 5929 or > customer_app_config_id = 11527 order by customer_app_config_id; > > > customer_app_config_id | customer_app_config_name > ------------------------+-------------------------- > 5929 | INFO > (1 row) > > > I do the same query but changing the order of the or conditions: > > > espsm_asme=# select customer_app_config_id, customer_app_config_name > from customer_app_config where customer_app_config_id = 11527 or > customer_app_config_id = 5929 order by customer_app_config_id; > > > customer_app_config_id | customer_app_config_name > ------------------------+-------------------------- > 11527 | MOVIDOSERENA TONI 5523 > (1 row) > > > > As you can see, the configuration 5929 and 11527 both exists, but > when I do the queries they don't appear. [snip] Just a guess, but perhaps your index is damaged. Have you tried REINDEXing? -- Bill Moran Collaborative Fusion Inc.