Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f5CGeWE44800 for ; Tue, 12 Jun 2001 12:40:32 -0400 (EDT) (envelope-from pgsql-general-owner@postgresql.org) Received: from allhats.xcski.com (roc-24-161-81-172.rochester.rr.com [24.161.81.172]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f572R4E26313 for ; Wed, 6 Jun 2001 22:27:04 -0400 (EDT) (envelope-from ptomblin@xcski.com) Received: by allhats.xcski.com (Postfix, from userid 406) id F16B545469; Wed, 6 Jun 2001 22:26:01 -0400 (EDT) Date: Wed, 6 Jun 2001 22:26:01 -0400 From: Paul Tomblin To: pgsql-general@postgresql.org Subject: Help me speed things up... Message-ID: <20010606222601.A7733@allhats.xcski.com> Mail-Followup-To: Paul Tomblin , pgsql-general@postgresql.org References: <20010607010814.72573.qmail@web10005.mail.yahoo.com> <6630.991879552@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <6630.991879552@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Wed, Jun 06, 2001 at 10:05:52PM -0400 X-Archive-Number: 200106/422 X-Sequence-Number: 10787 I'm doing some postgres stuff in perl. I haven't done much database stuff in many years, and back then I was doing Oracle in C. I'm doing a major query that gets a bunch of fields including a key, and then does other queries with that key on other tables. Now with Oracle I would have set up and compiled a query for the subqueries, and then only substituted in the key variable and do the query, and repeat ad-nauseum. (Forgive the fact that I've forgotten the terminology) There doesn't seem to be any way to do that in Pg.pm, unless I'm missing something, and my subqueries are making the whole thing slow as molasses. I think the query I just did took about 45 minutes when I did the subqueries, and about 30 seconds without. -- Paul Tomblin , not speaking for anybody "But I heard him exclaim, as he climbed in the night Merry Christmas to all, I have traffic in sight" - Phyllis Moses