Skip site navigation (1) Skip section navigation (2)

Re: PERFORMANCE and SIZE

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: "Alfranio Junior" <alfranio(at)lsd(dot)di(dot)uminho(dot)pt>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: PERFORMANCE and SIZE
Date: 2003-05-13 16:15:34
Message-ID: 200305130915.34850.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
Alfranio,

> And now, the optimizer started to use a table scan and in consequence gives
> me:

What appears to me to be happening is that the planner has incorrect estimates 
of the cost of an index lookup.   The base estimate is contained in the 
postgresql.conf parameter:
cpu_index_tuple_cost = 0.001

From the look of things, your disk/array has much better random seek times 
than the standard, or you have enough RAM to cache most of your tables.  
Either way, I would experiment with lowering the index_tuple_cost to, say, 
0.0003 and see if you get better use of indexes.

If that does work for you, make sure to check some other queries unrelated to 
the "customers" table to make sure that the new setting doesn't mess them up 
in some way.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


In response to

Responses

pgsql-performance by date

Next:From: Stephan SzaboDate: 2003-05-13 19:45:27
Subject: Re: How are null's stored?
Previous:From: Tom LaneDate: 2003-05-13 14:46:12
Subject: Re: [repost] partial index / funxtional idx or bad sql?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group