Re: query is taking longer time after a while

Поиск
Список
Период
Сортировка
От Brian Modra
Тема Re: query is taking longer time after a while
Дата
Msg-id 5a9699850909290525l3c5362c5q15b6cffe7194dd2b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: query is taking longer time after a while  (tomrevam <tomer@fabrix.tv>)
Ответы Re: query is taking longer time after a while  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
2009/9/29 tomrevam <tomer@fabrix.tv>:
>
>
>
> Brian Modra-2 wrote:
>>
>> When did you last do an analyse and re-create indexes?
>> Is the table UPDATEd to or DELETEd from, or just INSERTed ?
>> Is your DB auto vacuuming?
>>
>
> My DB is auto-vacuuming all the time. The specific table I'm talking about
> gets vacuumed at least every 2 hours (usually a little more frequently than
> that).
> Deletes are happening on the table at about the same rate as inserts (there
> are also some updates).

The index quite likely is in a poor state. You could try this:

analyse ....
create index ... (same parameters as existing index)
delete the old index.
rename the new index to the same name as the old one
repeat this for all indexes.

> --
> View this message in context:
http://www.nabble.com/query-is-taking-longer-time-after-a-while-tp25661219p25661758.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



--
Brian Modra   Land line: +27 23 5411 462
Mobile: +27 79 69 77 082
5 Jan Louw Str, Prince Albert, 6930
Postal: P.O. Box 2, Prince Albert 6930
South Africa
http://www.zwartberg.com/

В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: variables in ad hoc queries
Следующее
От: Brian Modra
Дата:
Сообщение: Re: variables in ad hoc queries