Skip site navigation (1) Skip section navigation (2)

Query only slow on first run

From: cluster <skrald(at)amossen(dot)dk>
To: pgsql-performance(at)postgresql(dot)org
Subject: Query only slow on first run
Date: 2007-11-27 16:33:36
Message-ID: fihgt1$1mmh$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-performance
I have a query that takes about 7000 ms in average to complete the first 
time it runs. Subsequent runs complete in only 50 ms. That is more than 
a factor 100 faster! How can I make the query perform good in the first 
run too?

Query and output from both first and second run of Explain Analyze is 
pasted here:

http://rafb.net/p/yrKyoA17.html

Responses

pgsql-performance by date

Next:From: Andrew SullivanDate: 2007-11-27 16:55:43
Subject: Re: Query only slow on first run
Previous:From: Heikki LinnakangasDate: 2007-11-27 10:12:38
Subject: Re: 8.1 planner problem ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group