From: Guillaume Cottenceau <gc@mnc.ch>
To: Laszlo Nagy <gandalf@designaproduct.biz>
Cc: pgsql-performance@postgresql.org
Subject: Re: Poor performance on seq scan
Date: 12 Sep 2006 14:46:18 +0200
Message-ID: <87y7spw8v9.fsf@meuh.mnc.lan> (raw)
In-Reply-To: <4506A9E7.2060303@designaproduct.biz>
References: <450684EC.4090304@designaproduct.biz>
<4506902C.7090407@enterprisedb.com>
<4506A9E7.2060303@designaproduct.biz>
Laszlo Nagy <gandalf 'at' designaproduct.biz> writes:
> > Probably, but PostgreSQL doesn't know how to do that. Even if it
> > did, it depends on how many matches there is. If you scan the index
> > and then fetch the matching rows from the heap, you're doing random
> > I/O to the heap. That becomes slower than scanning the heap
> > sequentially if you're going to get more than a few hits.
> I have 700 000 rows in the table, and usually there are less than 500
> hits. So probably using a "seq index scan" would be faster. :-) Now I
You can confirm this idea by temporarily disabling sequential
scans. Have a look at this chapter:
http://www.postgresql.org/docs/7.4/interactive/runtime-config.html#RUNTIME-CONFIG-QUERY
--
Guillaume Cottenceau
Create your personal SMS or WAP Service - visit http://mobilefriends.ch/
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: gc@mnc.ch, gandalf@designaproduct.biz
Subject: Re: Poor performance on seq scan
In-Reply-To: <87y7spw8v9.fsf@meuh.mnc.lan>
* 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