Vacuum and Vacuum analyze
От | Chris Boget |
---|---|
Тема | Vacuum and Vacuum analyze |
Дата | |
Msg-id | 00ce01c33f0e$6d68c2a0$8c01a8c0@ENTROPY обсуждение исходный текст |
Ответы |
Re: Vacuum and Vacuum analyze
|
Список | 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
В списке pgsql-novice по дате отправления: