Re: Forcing using index instead of sequential scan?

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, robin(dot)c(dot)smith(at)bt(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Forcing using index instead of sequential scan?
Date: 2006-07-23 03:28:48
Message-ID: 44C2ECF0.1040701@paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane wrote:
> <robin(dot)c(dot)smith(at)bt(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Kirkwood 2006-07-23 03:39:21 Re: Forcing using index instead of sequential scan?
Previous Message Gregory Stark 2006-07-22 23:15:31 Re: Forcing using index instead of sequential scan?