Re: [Q] optmizing postgres for 'single client' / many small queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "V S P" <toreason(at)fastmail(dot)fm>
Cc: "postgres general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [Q] optmizing postgres for 'single client' / many small queries
Date: 2009-09-02 18:26:01
Message-ID: 14643.1251915961@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"V S P" <toreason(at)fastmail(dot)fm> writes:
> The application typicall goes like this

> select id, child_tb_key_id, <fields with parms> from tb1

> then for each selected row above
> select from the child table do a select (like the above)

> and so on -- many levels deep

Seems like you need to fix your data representation so that this
operation can be collapsed into one query. The main problem looks
to be a bogus decision to have separate child tables rather than
one big table with an extra key column.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message V S P 2009-09-02 18:40:20 Re: [Q] optmizing postgres for 'single client' / many small queries
Previous Message Tom Lane 2009-09-02 18:16:14 Re: PL/SQL & unset custom variable