pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: cluster <skrald@amossen.dk>
To: pgsql-performance@postgresql.org
Subject: Query only slow on first run
Date: Tue, 27 Nov 2007 17:33:36 +0100
Message-ID: <fihgt1$1mmh$1@news.hub.org> (raw)

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



view thread (24+ messages)  latest in thread

Message-ID: <fihgt1$1mmh$1@news.hub.org>
Permalink:  ../fihgt1$1mmh$1@news.hub.org/
Also on:    postgresql.org/message-id/fihgt1$1mmh$1@news.hub.org

 · 

reply

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: skrald@amossen.dk
  Subject: Re: Query only slow on first run
  In-Reply-To: <fihgt1$1mmh$1@news.hub.org>

* 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