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

From Tomas Vondra
Subject Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!
Date
Msg-id c759e7996874c981952264043aa8a5ee.squirrel@sq.gransy.com
Whole thread Raw
In response to Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!  (Marcus Engene <mengpg2@engene.se>)
List 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


pgsql-performance by date:

Previous
From: "ktm@rice.edu"
Date:
Subject: Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!
Next
From: Tom Lane
Date:
Subject: Re: Performance Problem with postgresql 9.03, 8GB RAM,Quadcore Processor Server--Need help!!!!!!!