Re: 335 times faster (!)

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Mikael Carneholm <carniz(at)spray(dot)se>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: 335 times faster (!)
Date: 2003-02-03 17:55:29
Message-ID: 20030203095451.Q90968-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2003-02-03 17:55:55 Re: Drop constraint in PostgreSQL 7.1.2
Previous Message Stephane Charette 2003-02-03 17:53:42 Re: gp_dump: error in finding the last system oid: ERROR: get_relation_info: Relation 1262 not found