From: | mark(at)mark(dot)mielke(dot)cc |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Neil Conway <neilc(at)samurai(dot)com>, Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: PG qsort vs. Solaris |
Date: | 2006-10-03 22:47:35 |
Message-ID: | 20061003224734.GA1112@mark.mielke.cc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Oct 03, 2006 at 03:44:38PM -0400, Tom Lane wrote:
> select count(*) from
> (select random()::text from generate_series(1,1000000) order by 1) ss;
> ...
> postgres=# select count(*) from (select random() from generate_series(1,1000000) order by 1) ss;
I'm wondering whether 'order by 1' is representative of a real sort, from
the perspective of benchmarks.
I wonder why 'order by CONSTANT' might not be safe to optimize away as
no sort at all?
For sort functions that incrementally improve the sort order, I would
expect 'order by 1' to be a worst case scenario. Is that the intention?
Or is qsort unaffected by this use?
Cheers,
mark
--
mark(at)mielke(dot)cc / markm(at)ncf(dot)ca / markm(at)nortel(dot)com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada
One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-10-03 22:49:39 | Re: PG qsort vs. Solaris |
Previous Message | Jeremy Drake | 2006-10-03 22:46:03 | buildfarm failures in ECPG-Check |