Re: Memory usage during sorting
От | Hitoshi Harada |
---|---|
Тема | Re: Memory usage during sorting |
Дата | |
Msg-id | CAP7QgmmWGyi_ZKZpGRYQRVYcxx1eZ8sO3up2h01HFzoFjP-OOg@mail.gmail.com обсуждение исходный текст |
Ответ на | Memory usage during sorting (Jeff Janes <jeff.janes@gmail.com>) |
Ответы |
Re: Memory usage during sorting
|
Список | pgsql-hackers |
On Sun, Jan 15, 2012 at 4:59 PM, Jeff Janes <jeff.janes@gmail.com> wrote: > > The attached patch allows it to reuse that memory. On my meager > system it reduced the building of an index on an integer column in a > skinny 200 million row totally randomly ordered table by about 3% from > a baseline of 25 minutes. > Just to give a standard review, this patch is one line change and applies cleanly, builds ok. I'm not pretty sure what exactly you're trying to accomplish, but it seems to me that it's avoiding the first dumptuples cycle by forcing availMem = 0 even if it's negative. I read your comments as it'd be avoiding to alternate reading/writing back and force with scattered memory failing memory cache much during merge phase, but actually it doesn't affect merge phase but only init-dump phase, does it? If so, I'm not so convinced your benchmark gave 3 % gain by this change. Correct me as I'm probably wrong. Anyway, it's nice to modify the comment just above the change, since it's now true with it. Thanks, -- Hitoshi Harada
В списке pgsql-hackers по дате отправления: