Basic query performance question - Mailing list pgsql-novice

From Morgan Kita
Subject Basic query performance question
Date
Msg-id 08B420FF5BF7BC42A064212C2EB7688017E4CC@neutron.verseon.com
Whole thread Raw
List pgsql-novice
Hi,

I have a question about query performance. I have a pretty large query that hits a little of all my tables in the
database.It uses only index scans(mostly on my foreign key and primary key indexs). I notice that the first time it is
runfor a particular set of parameters it takes about a second. However, if I rerun the same exact query it takes about
1/1000of a second. 

I know this is pretty basic, and I think I understand the reasons, but is it just because after the initial query, the
pagesare now sitting in memory still? Is there anyway to take advantage of that for my initial run of the query? 

Thanks,
Morgan

pgsql-novice by date:

Previous
From: Matt Iskra
Date:
Subject: Trigger and Trigger function.
Next
From: John DeSoi
Date:
Subject: Re: Trigger and Trigger function.