From: | Guillaume Cottenceau <gc(at)mnc(dot)ch> |
---|---|
To: | Laszlo Nagy <gandalf(at)designaproduct(dot)biz> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Poor performance on seq scan |
Date: | 2006-09-12 12:46:18 |
Message-ID: | 87y7spw8v9.fsf@meuh.mnc.lan |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
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/
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2006-09-12 13:24:24 | Re: Poor performance on seq scan |
Previous Message | Laszlo Nagy | 2006-09-12 12:36:55 | Re: Poor performance on seq scan |