Re: pl/pgsql faster than raw SQL? - Mailing list pgsql-performance

From Gaetano Mendola
Subject Re: pl/pgsql faster than raw SQL?
Date
Msg-id 422EDC19.4080105@bigfoot.com
Whole thread Raw
In response to Re: pl/pgsql faster than raw SQL?  (John A Meinel <john@arbash-meinel.com>)
List pgsql-performance
-----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-----


pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Why would writes to pgsql_tmp bottleneck at 1mb/s?
Next
From: Gaetano Mendola
Date:
Subject: Re: vacuum full, why multiple times ?