X-Original-To: pgsql-performance@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2A6AB475E14 for ; Mon, 28 Apr 2003 07:00:15 -0400 (EDT) Received: from mail2.fbab.net (spectre.fbab.net [195.54.134.139]) by postgresql.org (Postfix) with SMTP id BF739475B47 for ; Mon, 28 Apr 2003 07:00:01 -0400 (EDT) Received: (qmail 5275 invoked by uid 136); 28 Apr 2003 11:00:04 -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.265754 secs); 28 Apr 2003 11:00:04 -0000 X-Qmail-Scanner-Mail-From: mag@fbab.net via mail2.fbab.net X-Qmail-Scanner: 1.10 (Clear:0. Processed in 0.265754 secs) Received: from unknown (HELO mail2.fbab.net:444) (195.54.134.228) by mail2.fbab.net with SMTP; 28 Apr 2003 11:00:03 -0000 Received: from 129.178.88.66 (SquirrelMail authenticated user magimap1) by mail2.fbab.net with HTTP; Mon, 28 Apr 2003 13:00:03 +0200 (CEST) Message-ID: <62257.129.178.88.66.1051527603.squirrel@mail2.fbab.net> Date: Mon, 28 Apr 2003 13:00:03 +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=-9.2 required=5.0 tests=BAYES_01,PRIORITY_NO_NAME,QUOTED_EMAIL_TEXT,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/228 X-Sequence-Number: 1734 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