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

Re: Query using SeqScan instead of IndexScan

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Cc: Brendan Duddridge <brendan(at)clickspace(dot)com>
Subject: Re: Query using SeqScan instead of IndexScan
Date: 2006-03-30 05:18:49
Message-ID: 200603292118.50033.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-performance
Brenden,

> Any ideas what I can do to improve this without turning sequential  
> scanning off?

Hmmm, looks like your row estimates are good.  Which means it's probably your 
postgresql.conf parameters which are off.  Try the following, in the order 
below:

1) Raise effective_cache_size to 2/3 of your RAM (remember that ecs is in 8k 
pages).  Test again.

2) Multiply all of the cpu_* costs by 0.3.  Test again.

3) Lower random_page_cost by steps to 3.5, then 3.0, then 2.5, then 2.0, 
testing each time.

These are all runtime-settable parameters, so you can test them in one query 
window, then set them in the main postgresql.conf if they work.

-- 
Josh Berkus
Sun Microsystems
San Francisco

In response to

Responses

pgsql-performance by date

Next:From: Greg QuinnDate: 2006-03-30 05:57:23
Subject: [Solved] Slow performance on Windows .NET and OleDb
Previous:From: Josh BerkusDate: 2006-03-30 05:14:27
Subject: Re: Database possible corruption , unsolvable mystery

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