Re: Test coverage for external sorting - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Test coverage for external sorting
Date
Msg-id 15333.1113314643@sss.pgh.pa.us
Whole thread Raw
In response to Test coverage for external sorting  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Test coverage for external sorting  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> Could anybody comment on whether the current tests appropriately cover
> the correctness of the external sorting algorithms?

It's highly unlikely that the regression tests stress external sorts
much, or that anyone would hold still for making them run long enough
to do so ;-)

It's not hard to create a stress test: just load a bunch of random
numbers into a table and create a b-tree index on it.  To check the
correctness of the sort, you could CLUSTER on the index and then read
out the table to see if it were now in sorted order.

BTW, as for your original question about performance, the current
external sort algorithm is mainly designed to conserve disk space,
not to be as fast as possible.  It could probably be a good bit faster
if we didn't mind taking twice as much space (mainly because the
physical disk access pattern would be a lot less random).  But I know
we will get push-back if we try to revert to doing that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: HEAD version of initdb fails on Win32
Next
From: Tom Lane
Date:
Subject: Re: OUT parameters in PL/Java