X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 977B8474E42 for ; Mon, 28 Apr 2003 06:59:37 -0400 (EDT) Received: from mail2.fbab.net (spectre.fbab.net [195.54.134.139]) by postgresql.org (Postfix) with SMTP id 1BF33474E42 for ; Mon, 28 Apr 2003 06:59:06 -0400 (EDT) Received: (qmail 5195 invoked by uid 136); 28 Apr 2003 10:59:07 -0000 Received: from mag@fbab.net by mail2.fbab.net by uid 133 with qmail-scanner-1.10 (F-PROT: 3.11. Clear:0. Processed in 0.267225 secs); 28 Apr 2003 10:59:07 -0000 X-Qmail-Scanner-Mail-From: mag@fbab.net via mail2.fbab.net X-Qmail-Scanner: 1.10 (Clear:0. Processed in 0.267225 secs) Received: from unknown (HELO mail2.fbab.net:444) (195.54.134.228) by mail2.fbab.net with SMTP; 28 Apr 2003 10:59:07 -0000 Received: from 129.178.88.66 (SquirrelMail authenticated user magimap1) by mail2.fbab.net with HTTP; Mon, 28 Apr 2003 12:59:07 +0200 (CEST) Message-ID: <59937.129.178.88.66.1051527547.squirrel@mail2.fbab.net> In-Reply-To: <200304281611.33669.shridhar_daithankar@nospam.persistent.co.in> References: <003401c30d70$92c07310$8001010a@sipec.es> <200304281611.33669.shridhar_daithankar@nospam.persistent.co.in> Date: Mon, 28 Apr 2003 12:59:07 +0200 (CEST) Subject: Re: Diferent execution plan for similar query From: "Magnus Naeslund(w)" To: "Shridhar Daithankar" Cc: pgsql-performance@postgresql.org Reply-To: mag@fbab.net User-Agent: SquirrelMail/1.4.0 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal X-Spam-Status: No, hits=-25.4 required=5.0 tests=BAYES_01,IN_REP_TO,PRIORITY_NO_NAME,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/227 X-Sequence-Number: 1733 Shridhar Daithankar said: > > In second case, postgresql typecasted it correctly. Even > eans.id_iean=345::int8 would have worked the same way. By default > postgresql > treats a number as int4 while comparing and integer and float8 for a real > numbe. I discovered that yesterday. > > Until the planner/parser gets smarter, this is going to be an FAQ.. > > Shridhar Is this an nontrivial change? Because if it's trivial it should be done, imho. I've been bitten indirectly of this, and it's not too easy to find out always. I think that this is one of the most unobvious performance hickups there are with postgresql. Magnus