X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 38C3CD1B345 for ; Fri, 18 Jun 2004 13:30:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 64358-06 for ; Fri, 18 Jun 2004 16:30:03 +0000 (GMT) Received: from relay.snowman.net (snowman.net [66.93.83.236]) by svr1.postgresql.org (Postfix) with ESMTP id 9E38CD1B298 for ; Fri, 18 Jun 2004 13:30:01 -0300 (ADT) Received: from ns.snowman.net (ns.snowman.net [10.10.0.2]) by relay.snowman.net (8.12.11/8.12.11/Debian-5) with ESMTP id i5IGTv2C024517; Fri, 18 Jun 2004 12:29:57 -0400 Received: from ns.snowman.net (localhost [127.0.0.1]) by ns.snowman.net (8.12.11/8.12.10/Debian-5) with ESMTP id i5IGU4Jr014882; Fri, 18 Jun 2004 12:30:04 -0400 Received: (from sfrost@localhost) by ns.snowman.net (8.12.11/8.12.10/Debian-5) id i5IGU3t2014880; Fri, 18 Jun 2004 12:30:03 -0400 Date: Fri, 18 Jun 2004 12:30:03 -0400 From: Stephen Frost To: Tom Lane Cc: Gary Cowell , pgsql-performance@postgresql.org Subject: Re: Major differences between oracle and postgres performance - what can I do ? Message-ID: <20040618163003.GM11196@ns.snowman.net> Mail-Followup-To: Tom Lane , Gary Cowell , pgsql-performance@postgresql.org References: <20040618132554.72968.qmail@web25103.mail.ukl.yahoo.com> <20412.1087570627@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+CeNbjWahVCCmU74" Content-Disposition: inline In-Reply-To: <20412.1087570627@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.4.24ns.3.0 (i686) X-Uptime: 12:15:17 up 139 days, 11:20, 6 users, load average: 0.04, 0.10, 0.09 User-Agent: Mutt/1.5.5.1+cvs20040105i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/197 X-Sequence-Number: 7255 --+CeNbjWahVCCmU74 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Tom Lane (tgl@sss.pgh.pa.us) wrote: > [... thinks for awhile ...] It seems possible that they may use sort > code that knows it is performing a DISTINCT operation and discards > duplicates on sight. Given that there are only 534 distinct values, > the sort would easily stay in memory if that were happening. Could this optimization be added to PostgreSQL? It sounds like a very reasonable thing to do. Hopefully there wouldn't be too much complexity needed to add it. Stephen --+CeNbjWahVCCmU74 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFA0xiLrzgMPqB3kigRAikJAJ95SOB/vwmCsPVSCKU6pzwGHy5nygCeMKv4 l2bJW6DW6tiUTbuE4hovOPQ= =IUAH -----END PGP SIGNATURE----- --+CeNbjWahVCCmU74--