Search Postgresql Archives

Re: Performance of Views

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

 



Steffen Boehme <Steffen@xxxxxxxx> writes:

> FROM
> 	ss_order_orderitems a
>    	LEFT JOIN ss_order_affiliate_tracking b ON a.order_id = b.order_id, ss_shops c
> WHERE
> 	(a.order_id = b.order_id OR b.order_id IS NULL) AND

What is that last line doing there? It's completely redundant and could very
well be the source of your problems.

For useful help you should post the \d output for the three tables and the
result of "EXPLAIN ANALYZE SELECT ...".

> The main-question at the moment iss ...
> Is the performance of the View-Method better then the first Method on
> the existing tables!?

A view doesn't change performance at all. It's exactly the same as writing the
query in the view directly into your query.

-- 
greg


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux