pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Help me speed things up...
2+ messages / 2 participants
[nested] [flat]

* Help me speed things up...
@ 2001-06-07 02:26  Paul Tomblin <ptomblin@xcski.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Paul Tomblin @ 2001-06-07 02:26 UTC (permalink / raw)
  To: pgsql-general@postgresql.org

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 <ptomblin@xcski.com>, 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Help me speed things up...
@ 2001-06-12 19:08  Doug McNaught <doug@wireboard.com>
  parent: Paul Tomblin <ptomblin@xcski.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Doug McNaught @ 2001-06-12 19:08 UTC (permalink / raw)
  To: Paul Tomblin <ptomblin@xcski.com>; +Cc: pgsql-general@postgresql.org

Paul Tomblin <ptomblin@xcski.com> writes:

> 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.

It's hard to say what might be going on, but I doubt that the
query-compile overhead is hitting you that hard.  Care to post a
schema and EXPLAIN output for the queries you're doing??

-Doug (a former Monastery inmate..)
-- 
The rain man gave me two cures; he said jump right in,
The first was Texas medicine--the second was just railroad gin,
And like a fool I mixed them, and it strangled up my mind,
Now people just get uglier, and I got no sense of time...          --Dylan



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-06-12 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-06-07 02:26 Help me speed things up... Paul Tomblin <ptomblin@xcski.com>
2001-06-12 19:08 ` Doug McNaught <doug@wireboard.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox