Re: Top-N sorts verses parallelism

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Top-N sorts verses parallelism
Date: 2017-12-13 21:55:09
Message-ID: CAMkU=1w6BJ5RJs0HxXi6K_jqVcUPYp0qz_8izeEF9AsGkAQSmg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 12, 2017 at 10:46 PM, Thomas Munro <
thomas(dot)munro(at)enterprisedb(dot)com> wrote:

> Hi hackers,
>
> The start-up cost of bounded (top-N) sorts is sensitive at the small
> end of N, and the
> comparison_cost * tuples * LOG2(2.0 * output_tuples) curve doesn't
> seem to correspond to reality.

Do we want the cost-estimate to be accurate for the worst case (which is
not terribly unlikely to happen, input order is opposite of desired output
order), or for the average case?

Cheers,

Jeff

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-12-13 22:45:07 Re: [HACKERS] Parallel Hash take II
Previous Message Robert Haas 2017-12-13 21:53:46 Re: Top-N sorts verses parallelism