Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "Marcus Engene" <mengpg2(at)engene(dot)se>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!
Date: 2011-11-01 13:13:34
Message-ID: c759e7996874c981952264043aa8a5ee.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On 1 Listopad 2011, 10:57, Marcus Engene wrote:
> Hi Hashim,
>
> One workaround I've done is if something looking like this....
>
> select
> ...
> from
> table_linking_massive_table tlmt
> ,massive_table mt
> ,some_table1 st1
> ,some_table2 st2
> ,some_table3 st3
> ,some_table4 st4
> where
> tlmt.group_id = 123223 AND
> mt.id = tmlt.massive_table AND
> st1.massive_table = mt.id AND
> st2.massive_table = mt.id AND
> st3.massive_table = mt.id AND
> st4.massive_table = mt.id
>
> ...suddenly gets slow, it has helped to rewrite it as....
>
> select
> ...
> from
> (
> select
> ...
> from
> table_linking_massive_table tlmt
> ,massive_table mt
> where
> tlmt.group_id = 123223 AND
> mt.id = tmlt.massive_table AND
> ) as mt
> ,some_table1 st1
> ,some_table2 st2
> ,some_table3 st3
> ,some_table4 st4
> where
> tlmt.group_id = 123223 AND
> mt.id = tmlt.massive_table AND
> st1.massive_table = mt.id AND
> st2.massive_table = mt.id AND
> st3.massive_table = mt.id AND
> st4.massive_table = mt.id
>

Can you please post EXPLAIN ANALYZE of those queries? It's difficult to
see what's wrong when we don't know the plan (and the actual stats
gathered during execution). Use explain.depesz.com to post the output.

Tomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-11-01 13:43:00 Re: Performance Problem with postgresql 9.03, 8GB RAM, Quadcore Processor Server--Need help!!!!!!!
Previous Message ktm@rice.edu 2011-11-01 12:53:42 Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2011-11-01 13:43:00 Re: Performance Problem with postgresql 9.03, 8GB RAM, Quadcore Processor Server--Need help!!!!!!!
Previous Message ktm@rice.edu 2011-11-01 12:53:42 Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!