From: | Scott Carey <scott(at)richrelevance(dot)com> |
---|---|
To: | Wei Yan <weiyan1(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: query slow only after reboot |
Date: | 2009-02-10 02:20:56 |
Message-ID: | C5B62488.2495%scott@richrelevance.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
You can try using the pg_stat_io table and related stat tables to figure out which ones are responsible for all this I/O on startup.
Then, for the big offenders issue a select count(*) on those right at the start, to force the OS to read the pages into memory. This won't be effective if these are too much larger than RAM. Also, running queries that do large index scans on tables/indexes heavily used can help.
Its a brute force preload, but my guess is your woes are caused by random I/O on tables and indexes that you can attempt to pre-cache by forcing sequential access on some of that data. There are many other ways to read heavily accessed tables or indexes into OS memory on a freshly restarted system - even just reading the raw files with something like grep.
On 2/9/09 5:21 PM, "Wei Yan" <weiyan1(at)gmail(dot)com> wrote:
Hi:
Our queries are extremely slow only after db server reboot, not after restart postgres db only. The difference is about 10 mins vs. 8 secs. Not acceptable. I have browsed around , set the postgres db parameters as suggested. Still the same.
Any suggestion on how to tackle the problem?
Thanks
wei
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar Mallah | 2009-02-10 10:31:21 | query becomes fas on 'SET enable_hashjoin TO off;' |
Previous Message | Steve Crawford | 2009-02-10 01:35:47 | Re: query slow only after reboot |