From: | Jason Long <mailing(dot)list(at)supernovasoftware(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: full vacuum really slows down query |
Date: | 2008-06-04 23:49:04 |
Message-ID: | 484729F0.5050603@supernovasoftware.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Yes. <br>
This is what I do.<br>
1. Vacuum full<br>
2. Reindex force<br>
This is done ever night<br>
<br>
My users complained about a report being slow.<br>
<br>
I grabbed a dump and restored it to my development machine.<br>
<br>
The query worked just fine, but not on the production server.<br>
<br>
I did a vacuum full and then reran the query. Now it performs just as
slow as on the production machine. That is the only change I made.<br>
<br>
I am in the process of trying to figure out the EXPLAIN ANALYZE for
both queries, but I have never had to read this output and I am
unfamiliar with how to find the problem. I will post both here and
maybe someone can help me out.<br>
<br>
<br>
<br>
Joshua D. Drake wrote:
<blockquote cite="mid:1212621063(dot)12052(dot)388(dot)camel(at)jd-laptop" type="cite">
<pre wrap="">
On Wed, 2008-06-04 at 17:02 -0500, Jason Long wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I have a query that takes 2 sec if I run it from a freshly restored
dump. If I run a full vacuum on the database it then takes 30 seconds.
</pre>
</blockquote>
<pre wrap=""><!---->
If you run it a second time after the vacuum full?
Joshua D. Drake
</pre>
</blockquote>
<br>
</body>
</html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Marlowe | 2008-06-04 23:53:38 | Re: full vacuum really slows down query |
Previous Message | Tom Lane | 2008-06-04 23:44:28 | Re: full vacuum really slows down query |