Re: A worst case for qsort

From: Rod Taylor <rod(dot)taylor(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A worst case for qsort
Date: 2014-08-07 21:34:30
Message-ID: CAKddOFAfkp_3M7k+-==qcGO8FRPX=6QP9FNtsSwCMFM+pZdpiA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sigh. Found another example.

A table with 15 million entries and a unique key on filesystem location for
things users created via a web interface.

Entries all begin with /usr/home/ ...

This one is frequently sorted as batch operations against the files are
performed in alphabetical order to reduce conflict issues that a random
ordering may cause between jobs.

regards,

Rod

On Thu, Aug 7, 2014 at 5:23 PM, Rod Taylor <rod(dot)taylor(at)gmail(dot)com> wrote:

>
> On Thu, Aug 7, 2014 at 3:06 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
>
>> I think that pre-sorted, all-unique text datums, that have all
>> differences beyond the first 8 bytes, that the user happens to
>> actually want to sort are fairly rare.
>
>
> While I'm sure it's not common, I've seen a couple of ten-million tuple
> tables having a URL column as primary key where 98% of the entries begin
> with 'http://www.'
>
> So, that exact scenario is out there.
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-08-07 21:52:17 Re: A worst case for qsort
Previous Message Peter Geoghegan 2014-08-07 21:33:10 Re: A worst case for qsort