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 E841F329CA4 for ; Wed, 8 Sep 2004 15:47:55 +0100 (BST) 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 04323-02 for ; Wed, 8 Sep 2004 14:47:45 +0000 (GMT) Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by svr1.postgresql.org (Postfix) with ESMTP id 97C36329C89 for ; Wed, 8 Sep 2004 15:47:47 +0100 (BST) Received: (qmail 4026 invoked from network); 8 Sep 2004 14:47:47 -0000 Received: from dsl092-016-161.sfo4.dsl.speakeasy.net (HELO [10.0.2.103]) (asah@[66.92.16.161]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 8 Sep 2004 14:47:47 -0000 Message-ID: <413F1B85.9040302@speakeasy.net> Date: Wed, 08 Sep 2004 07:47:33 -0700 From: Adam Sah User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: Problem with large query References: <200409081549.49537.mcousin@sigma.fr> <20149.1094654443@sss.pgh.pa.us> In-Reply-To: <20149.1094654443@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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: 200409/70 X-Sequence-Number: 8198 by the way, this reminds me: I just ran a performance study at a company doing an oracle-to-postgres conversion, and FYI converting from numeric and decimal to integer/bigint/real saved roughly 3x on space and 2x on performance. Obviously, YMMV. adam Tom Lane wrote: > Marc Cousin writes: > >>I'm having trouble with a (quite big) query, and can't find a way to make it >>faster. > > > Seems like it might help if the thing could use a HashAggregate instead > of sort/group. Numeric is not hashable, so having those TO_NUMBER > constants in GROUP BY destroys this option instantly ... but why in the > world are you grouping by constants anyway? You didn't say what the > datatypes of the other columns were... > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > >