From: | Bryce Ewing <bryce(at)smx(dot)co(dot)nz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Index Scan taking long time |
Date: | 2009-06-18 22:11:25 |
Message-ID: | 4A3ABB8D.4070204@smx.co.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hi Tom,
We have managed to improve significantly on the speed of this query.
The way that we did this was through clustering the table based on the
domain index which significantly reduced the page reads that were
required in order to perform the query.
Also to find this we turned on log_statement_stats to see what it was doing.
This was on a table of roughly 600MB where the domains were randomly
dispersed.
Cheers
Bryce
Tom Lane wrote:
> Bryce Ewing <bryce(at)smx(dot)co(dot)nz> writes:
>
>> So it seems to me that once the index is in memory everything is fine
>> with the world, but the loading of the index into memory is horrendous.
>>
>
> So it would seem. What's the disk hardware on this machine?
>
> It's possible that part of the problem is table bloat, leading to the
> indexscan having to fetch many more pages than it would if the table
> were more compact.
>
> regards, tom lane
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Brian Cox | 2009-06-18 23:34:39 | select max() much slower than select min() |
Previous Message | Kevin Grittner | 2009-06-18 21:01:17 | Re: Strange performance response for high load times |