From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Vacuum, Freeze and Analyze: the big picture |
Date: | 2013-06-03 21:27:01 |
Message-ID: | CAM3SWZSJPgewee_dTicq3PuZgrY+63SbbzATHTr+rdg4ykOp-w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 3, 2013 at 5:03 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> I've seen cases on Stack Overflow and elsewhere in which disk merge
> sorts perform vastly better than in-memory quicksort, so the user
> benefited from greatly *lowering* work_mem.
I've heard of that happening on Oracle, when the external sort is
capable of taking advantage of I/O parallelism, but I have a pretty
hard time believing that it could happen with Postgres under any
circumstances. Maybe if someone was extraordinarily unlucky and
happened to hit quicksort's O(n ^ 2) worst case it could happen, but
we take various measures that make that very unlikely. It might also
have something to do with our "check for pre-sorted input" [1], but
I'm still skeptical.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2013-06-03 21:35:33 | Re: Vacuum, Freeze and Analyze: the big picture |
Previous Message | Robert Haas | 2013-06-03 21:26:08 | Re: Vacuum, Freeze and Analyze: the big picture |