pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gaetano Mendola <mendola@bigfoot.com>
To: John A Meinel <john@arbash-meinel.com>
Cc: Gaetano Mendola <mendola@bigfoot.com>
Cc: Markus Bertheau ☭ <twanger@bluetwanger.de>
Cc: pgsql-performance@postgresql.org
Subject: Re: pl/pgsql faster than raw SQL?
Date: Wed, 09 Mar 2005 12:20:57 +0100
Message-ID: <422EDC19.4080105@bigfoot.com> (raw)
In-Reply-To: <422E511B.40102@arbash-meinel.com>
References: <1110284432.4905.18.camel@dicaprio.akademie1.de>
	<422E4948.3090208@bigfoot.com>
	<422E511B.40102@arbash-meinel.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A Meinel wrote:
 > That sounds more like you had bad statistics on the field1 column, which
> caused postgres to switch from a seqscan to an index scan, only there
> were so many rows with field1='New' that it actually would have been
> faster with a seqscan.

The field1 was a calculated field and with the filter "='New'"
postgres was executing that function on more rows than without filter.



Regards
Gaetano Mendola



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCLtwZ7UpzwH2SGd4RAhU5AJwMeFWwIO/UfdU0QTDo+FTCxPhqYACfYNVl
1yBUEObhZhUDnNDXdsJ/bi0=
=xc8U
-----END PGP SIGNATURE-----




view thread (6+ messages)

Message-ID: <422EDC19.4080105@bigfoot.com>
Permalink:  ../422EDC19.4080105@bigfoot.com/
Also on:    postgresql.org/message-id/422EDC19.4080105@bigfoot.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: mendola@bigfoot.com, john@arbash-meinel.com, twanger@bluetwanger.de
  Subject: Re: pl/pgsql faster than raw SQL?
  In-Reply-To: <422EDC19.4080105@bigfoot.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