Re: Slow query problem
От | Mike Glover |
---|---|
Тема | Re: Slow query problem |
Дата | |
Msg-id | 20040108192716.26c4b369.mpg4@duluoz.net обсуждение исходный текст |
Ответ на | Slow query problem (Bradley Tate <btate@objectmastery.com>) |
Ответы |
Re: Slow query problem
Re: Slow query problem |
Список | pgsql-performance |
On Thu, 08 Jan 2004 16:52:05 +1100 Bradley Tate <btate@objectmastery.com> wrote: > Am I correct in interpreting that most time was spent doing the > sorting? looks so. your table is about 70MB total size, and its getting loaded completely into memory (you have 12000 * 8k = 96M available). 26s to load 70MB from disk seems reasonable. The rest of the time is used for sorting. > Explain confuses the heck out of me and any help on how I could make > this run faster would be gratefully received. > You should bump sort_mem as high as you can stand. with only 8MB sort memory available, you're swapping intermediate sort pages to disk -- a lot. Try the query with sort_mem set to 75MB (to do the entire sort in memory). -mike > Cheers, > > Bradley. > > > ---------------------------(end of > broadcast)--------------------------- TIP 8: explain analyze is your > friend -- Mike Glover Key ID BFD19F2C <mpg4@duluoz.net>
Вложения
В списке pgsql-performance по дате отправления: