Unix Technical Forum

Re: Which qsort is used

This is a discussion on Re: Which qsort is used within the pgsql Hackers forums, part of the PostgreSQL category; --> I will send you an ANSI C version. > -----Original Message----- > From: Qingqing Zhou [mailto:zhouqq@cs.toronto.edu] > Sent: Tuesday, ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 08:20 AM
Dann Corbit
 
Posts: n/a
Default Re: Which qsort is used

I will send you an ANSI C version.

> -----Original Message-----
> From: Qingqing Zhou [mailto:zhouqq@cs.toronto.edu]
> Sent: Tuesday, December 13, 2005 1:08 PM
> To: Dann Corbit
> Cc: Tom Lane; Luke Lonergan; Neil Conway; Bruce Momjian; pgsql-
> hackers@postgresql.org
> Subject: RE: [HACKERS] Which qsort is used
>
>
>
> On Tue, 13 Dec 2005, Dann Corbit wrote:
>
> > The test is designed especially for database systems, which are

likely
> > to be clustered on data or index (and in the general case are

sometimes
> > loaded in physically sorted order). In the clustered case, the only
> > time the data will not be ordered is when there has been a page

split
> > and the statistics have not been updated.
> >
> > The in-order check happens only once and there will not be a

significant
> > performance hit for removal (except that it will be absurdly fast

when
> > the data is already ordered or in reverse order if left as-is.)
> >
> > Ordered and reverse-ordered are two cases where qsort goes quadratic
> > (without a test). Of course, introspective sort does not suffer

from
> > this defect, even with the test removed.
> >

>
> Yeah, I would think O(n) in-order check doesn't matter for random data
> set. For nearly-ordered set, may be not true. I am not good at C++, so

can
> you patch the test program with your sort method and the

page-split-data
> generator? I would be happy to give it a test.
>
> Regards,
> Qingqing


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:10 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com