Re: SQL Functions and plan time
От | nolan@celery.tssi.com |
---|---|
Тема | Re: SQL Functions and plan time |
Дата | |
Msg-id | 20030708083414.14764.qmail@celery.tssi.com обсуждение исходный текст |
Ответ на | Re: SQL Functions and plan time (Richard Huxton <dev@archonet.com>) |
Ответы |
Re: SQL Functions and plan time
|
Список | pgsql-general |
> So why am I getting substantially different times for identical queries > (except for parameter substitution) This sounds like the question I asked two weeks ago. What I concluded was that though they may be identical queries, they are not identical in terms of what happens when you execute them. Why? Because the tuples have been updated, meaning that the affected rows are in different physical locations than they used to be in both the table and in any indexes. Imagine that you have to pick up 10 items at the grocery store. You have a list of which aisles they're in. Tomorrow you go back to the store to pick up the same 10 items. However, overnight the store has moved them all to different locations. Even though you have an updated list, it will likely take you a different amount of time to pick up those 10 items. Running a vacuum analyze and rebuilding indexes between runs should produce more consistent timings, if consistent timings are important. Readonly queries running on an otherwise idle server should produce more consistent timings, subject to caching issues. -- Mike Nolan
В списке pgsql-general по дате отправления: