Re: [PERFORM] turn off caching for performance test

2010-10-01 Thread Willy-Bas Loos
> I found one query that did a seqscan anyway(with enable_seqscan off), > because doing an index scan would be more than 1M points more > expensive (to the planner). Hmm, i guess that says it all :) -- "Patriotism is the conviction that your country is superior to all others because you were born

Re: [PERFORM] turn off caching for performance test

2010-09-30 Thread Willy-Bas Loos
Hi, Sorry for the late answer. I found the query i was looking for in the log (duration) and could prove that the seqscan is faster if the data were not cached. This particular one was 22% faster. It is "a query which will get turned into a nested loop index scan for a lot of rows, on a huge table

Re: [PERFORM] turn off caching for performance test

2010-09-25 Thread Robert Haas
On Fri, Aug 27, 2010 at 1:57 PM, Scott Marlowe wrote: > On Thu, Aug 26, 2010 at 4:32 AM, Willy-Bas Loos wrote: >> Hi, >> >> I have a colleague that is convinced that the website is faster if >> enable_seqscan is turned OFF. >> I'm convinced of the opposite (better to leave it ON), but i would lik

Re: [PERFORM] turn off caching for performance test

2010-09-15 Thread Merlin Moncure
On Thu, Aug 26, 2010 at 6:32 AM, Willy-Bas Loos wrote: > I have a colleague that is convinced that the website is faster if > enable_seqscan is turned OFF. > I'm convinced of the opposite (better to leave it ON), but i would like to > show it, prove it to him. > Now the first query we tried, would

Re: [PERFORM] turn off caching for performance test

2010-08-27 Thread Scott Marlowe
On Thu, Aug 26, 2010 at 4:32 AM, Willy-Bas Loos wrote: > Hi, > > I have a colleague that is convinced that the website is faster if > enable_seqscan is turned OFF. > I'm convinced of the opposite (better to leave it ON), but i would like to > show it, prove it to him. Stop, you're both doing it w

Re: [PERFORM] turn off caching for performance test

2010-08-27 Thread Greg Smith
Willy-Bas Loos wrote: But that's only the OS cache. There's also the shared_buffers, which are a postgres specific thing. I've found DISCARD in the manual , but that only influences a single session, not the shared buffers. I re

Re: [PERFORM] turn off caching for performance test

2010-08-27 Thread Willy-Bas Loos
@Pierre: i know.. but first i'd have to find such a query from real-life. And also, i'm convinced that this query would be faster with a seqscan if the data wenen't cached. @Arjen: thanks, that helps. But that's only the OS cache. There's also the shared_buffers, which are a postgres specific thi

Re: [PERFORM] turn off caching for performance test

2010-08-26 Thread Pierre C
The bitmap heap scan is 3% faster, 3% isn't really significant. Especially if the new setting makes one query 100 times slower... Like a query which will, by bad luck, get turned into a nested loop index scan for a lot of rows, on a huge table which isn't in cache... -- Sent via pgsql-

Re: [PERFORM] turn off caching for performance test

2010-08-26 Thread Arjen van der Meijden
Isn't it more fair to just flush the cache before doing each of the queries? In real-life, you'll also have disk caching... Flushing the buffer pool is easy, just restart PostgreSQL (or perhaps there is a admin command for it too?). Flushing the OS-disk cache is obviously OS-dependent, for linu