Re: 335 times faster (!) - Mailing list pgsql-general

From Stephan Szabo
Subject Re: 335 times faster (!)
Date
Msg-id 20030203095451.Q90968-100000@megazone23.bigpanda.com
Whole thread Raw
In response to 335 times faster (!)  (Mikael Carneholm <carniz@spray.se>)
List pgsql-general
On Mon, 3 Feb 2003, Mikael Carneholm wrote:

> When searching for a specific row on the primary key (type: bigint),
> the search took about 6,5 seconds. The column has a default btree
> index as created by the primary key constraint. However, when
> searching for the same row on one of it's columns (type: text) which
> has a functional index on lower(column name), the same row was
> retrieved in 19ms! That's ~335 times faster!

Did you remember to cast the constant into bigint?  If not, it probably
ignored the bigint index and did a table scan.


pgsql-general by date:

Previous
From: Arjen van der Meijden
Date:
Subject: Re: Printer setup
Next
From: Stephan Szabo
Date:
Subject: Re: Drop constraint in PostgreSQL 7.1.2