From: | "Chris Boget" <chris(at)wild(dot)net> |
---|---|
To: | "PGSql Novice" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Vacuum and Vacuum analyze |
Date: | 2003-06-30 13:49:28 |
Message-ID: | 00ce01c33f0e$6d68c2a0$8c01a8c0@ENTROPY |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I'm starting a new thread, apart from the one I started
earlier, just on this topic.
Should you run either (or both) of these every time you've
added data to the database? After you've added indexes
or keys? As I mention in my other email, I ran a query
immediately after I added the data and the response time
was dismal to say the least. After seeing that, I tried add-
ing a few new indexes in hopes of speeding up the query
but that didn't help matters, either. The response time was
just as bad (although, the new indexes did shave off a
millisecond or two).
But then, on the suggestion of two fellow list members, I
ran 'vacuum analyze' from the command line (even though
I had done that already, with no apparent effect, through the
pgAdminII interface but that's another topic) then executed
the query again. I was very happy to see that the rows were
returning in milliseconds as opposed to the (many) seconds
they were being returned previously.
So that begs the question (from a newbie), when should these
commands, 'vacuum' and 'vacuum analyze' be run and how
often?
thnx,
Christoph
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-06-30 13:54:11 | Re: Noobie: Problems with a query |
Previous Message | Chris Boget | 2003-06-30 13:42:07 | Re: Noobie: Problems with a query |