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 7F6CED1B26E for ; Wed, 30 Jun 2004 11:27:30 -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 95765-02 for ; Wed, 30 Jun 2004 14:27:28 +0000 (GMT) Received: from tht.net (vista.tht.net [216.126.88.2]) by svr1.postgresql.org (Postfix) with ESMTP id CCF6DD1B252 for ; Wed, 30 Jun 2004 11:27:21 -0300 (ADT) Received: from [134.22.68.4] (dyn-68-4.tor.dsl.tht.net [134.22.68.4]) by tht.net (Postfix) with ESMTP id 0646076AAA; Wed, 30 Jun 2004 10:27:28 -0400 (EDT) Subject: Re: Query performance From: Rod Taylor To: Bill Cc: Postgresql Performance In-Reply-To: <200406301346.i5UDktfL013134@math.uchicago.edu> References: <200406301346.i5UDktfL013134@math.uchicago.edu> Content-Type: text/plain Message-Id: <1088605644.12340.10.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 30 Jun 2004 10:27:25 -0400 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: 200406/323 X-Sequence-Number: 7381 > Can I get any better performance? You can try bumping your sort memory way up (for this query only). Another method would be to cluster the table by the symbol column (eliminates the expensive sort). If you could run a very simple calculation against open & close numbers to eliminate a majority of symbols early, that would be useful as well.