Обсуждение: Basic query performance question

Поиск
Список
Период
Сортировка

Basic query performance question

От
"Morgan Kita"
Дата:
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