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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux