From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Performance of Views |
Date: | 2005-03-02 07:10:07 |
Message-ID: | 871xayzfow.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Steffen Boehme <Steffen(at)boemm(dot)de> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Sim Zacks | 2005-03-02 07:21:44 | cursor already in use error |
Previous Message | Ragnar Hafstað | 2005-03-02 06:52:37 | Re: sql join question |