From: Mark Kirkwood <markir@paradise.net.nz>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: robin.c.smith@bt.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Forcing using index instead of sequential scan?
Date: Sun, 23 Jul 2006 15:28:48 +1200
Message-ID: <44C2ECF0.1040701@paradise.net.nz> (raw)
In-Reply-To: <26827.1153585341@sss.pgh.pa.us>
References: <D012B9600FFB984AB18C0D53C475A4A081F51B@E03MVZ3-UKDY.domain1.systemhost.net>
<26827.1153585341@sss.pgh.pa.us>
Tom Lane wrote:
> <robin.c.smith@bt.com> writes:
>> I have been testing the performance of PostgreSQL using the simple tool
>> found at http://benchw.sourceforge.net however I have found that all the
>> queries it run execute with sequential scans. The website where the code
>> runs has examples of the execution plan using indexes.
>
> The reason the website gets indexscans is that he's fooled with the
> planner cost parameters. In particular I see that...(snipped)
>
Indeed I did - probably should have discussed that alteration better in
the documentation for the test suite!
In addition I was a bit naughty in running the benchmark using size 1
(i.e about 1G) an a box with 2G ram - as this meant that (on the machine
I was using then anyway) indexscans on query 0 and 1 were *always*
better than the sequential options.
A better test is to use the size factor at 2 x physical ram, as then the
planners defaults make more sense! (unless or course you *want* to model
a data mart smaller than physical ram).
Best wishes
Mark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: markir@paradise.net.nz, tgl@sss.pgh.pa.us, robin.c.smith@bt.com
Subject: Re: Forcing using index instead of sequential scan?
In-Reply-To: <44C2ECF0.1040701@paradise.net.nz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox