pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Frank Joerdens <frank@joerdens.de>
To: Craig James <craig_james@emolecules.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Typecast bug?
Date: Thu, 26 Jun 2008 08:02:13 +0100
Message-ID: <7d10d2df0806260002w8707ea1rf8f62ca8126099a8@mail.gmail.com> (raw)
In-Reply-To: <4863186E.1000306@emolecules.com>
References: <D960CB61B694CF459DCFB4B0128514C201FA62C8@exadv11.host.magwien.gv.at>
	<47FFA7FF.10801@postnewspapers.com.au>
	<544D07A2-EB3F-4D91-A749-0C4D5D38AB80@gmail.com>
	<481F992D.7070509@emolecules.com>
	<Pine.GSO.4.64.0805052354120.3752@westnet.com>
	<4820A3C2.4000307@emolecules.com>
	<Pine.GSO.4.64.0805061605030.11474@westnet.com>
	<4820C30A.8010709@emolecules.com>
	<D960CB61B694CF459DCFB4B0128514C202122018@exadv11.host.magwien.gv.at>
	<4863186E.1000306@emolecules.com>

On 6/26/08, Craig James <craig_james@emolecules.com> wrote:
> This seems like a bug to me, but it shows up as a performance problem.
> Since the column being queried is an integer, the second query (see below)
> can't possibly match, yet Postgres uses a typecast, forcing a full table
> scan for a value that can't possibly be in the table.

Which version are you using? 8.3 removes a lot of implicit casts (all?
not sure), so this may already be your fix.

Cheers,

Frank



view thread (5+ messages)  latest in thread

Message-ID: <7d10d2df0806260002w8707ea1rf8f62ca8126099a8@mail.gmail.com>
Permalink:  ../7d10d2df0806260002w8707ea1rf8f62ca8126099a8@mail.gmail.com/
Also on:    postgresql.org/message-id/7d10d2df0806260002w8707ea1rf8f62ca8126099a8@mail.gmail.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: frank@joerdens.de, craig_james@emolecules.com
  Subject: Re: Typecast bug?
  In-Reply-To: <7d10d2df0806260002w8707ea1rf8f62ca8126099a8@mail.gmail.com>

* 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