Re: Planner estimates cost of 'like' a lot lower than '='?? - Mailing list pgsql-general

From Buddy Lee Haystack
Subject Re: Planner estimates cost of 'like' a lot lower than '='??
Date
Msg-id 3B5ADA26.BF5FF52@email.rentzone.org
Whole thread Raw
In response to Planner estimates cost of 'like' a lot lower than '='??  (Mats Lofkvist <mal@algonet.se>)
List pgsql-general
Mats Lofkvist wrote:
>
> I have a multiple-join select that takes ~70 seconds to execute
> but if I remove one of the indexes the time drops to ~2 seconds.
>
>       _
> Mats Lofkvist
> mal@algonet.se
>

I ran into a similar problem on RedHat Linux v6.1 on Intel, kernel
2.2.12-20, PostgreSQL 6.5.3 when moving a system from a single processor
development box over to a dual processor production server. Dropping one
of the indexes on a lookup table with roughly 68,000 records on the
production box resulted in roughly a 3 fold increase in query execution
speed. At the time, I thought it was an SMP issue, and have since been
extremely conservative in adding indexes on SMP boxes.

pgsql-general by date:

Previous
From: Mats Lofkvist
Date:
Subject: Planner estimates cost of 'like' a lot lower than '='??
Next
From: Bruno Wolff III
Date:
Subject: Re: How Postgresql Compares... Count(*) and others