| От | Pierre C |
|---|---|
| Тема | Re: Really really slow select count(*) |
| Дата | |
| Msg-id | op.vqe98ttzeorkce@apollo13 обсуждение исходный текст |
| Ответ на | Re: Really really slow select count(*) (Shaun Thomas <sthomas@peak6.com>) |
| Список | pgsql-performance |
On Fri, 04 Feb 2011 21:37:56 +0100, Shaun Thomas <sthomas@peak6.com> wrote: > On 02/04/2011 02:14 PM, felix wrote: > >> oh and there in the footnotes to django they say "dont' forget to run >> the delete expired sessions management every once in a while". >> thanks guys. > > Oh Django... :) > >> it won't run now because its too big, I can delete them from psql though > > You might be better off deleting the inverse. You know, start a > transaction, select all the sessions that *aren't* expired, truncate the > table, insert them back into the session table, and commit. Note that for a session table, that is updated very often, you can use the postgres' HOT feature which will create a lot less dead rows. Look it up in the docs.
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера