pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steinar H. Gunderson <sgunderson@bigfoot.com>
To: Mattias Kregert <mattias@kregert.se>
Cc: pgsql-performance@postgresql.org
Subject: Re: Strange plan in pg 8.1.0
Date: Mon, 30 Oct 2006 16:49:57 +0100
Message-ID: <20061030154957.GA7834@uio.no> (raw)
In-Reply-To: <003301c6fc2f$57e2c660$09000a0a@kregert.se>
References: <200610301205.08087.mattias@kregert.se>
	<20061030122733.GA6357@uio.no>
	<003301c6fc2f$57e2c660$09000a0a@kregert.se>

On Mon, Oct 30, 2006 at 03:26:09PM +0100, Mattias Kregert wrote:
> On the left side it is text, and on the right side it is varchar(10).
> Casting left side to varchar(10) does not help, in fact it makes things 
> even worse: The cast to ::text vanishes in a puff of logic, but the plan 
> gets bigger and even slower (20-25 seconds).

Casting definitely won't help it any; it was more a question of having the
types in the _tables_ be the same.

Anyhow, this might be a red herring; others might have something more
intelligent to say in this matter.

By the way, does it use an index scan if you turn off sequential scans
(set enable_seqscan = false)?

/* Steinar */
-- 
Homepage: http://www.sesse.net/



view thread (6+ messages)

Message-ID: <20061030154957.GA7834@uio.no>
Permalink:  ../20061030154957.GA7834@uio.no/
Also on:    postgresql.org/message-id/20061030154957.GA7834@uio.no

 · 

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: sgunderson@bigfoot.com, mattias@kregert.se
  Subject: Re: Strange plan in pg 8.1.0
  In-Reply-To: <20061030154957.GA7834@uio.no>

* 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