Views + Criteria - Mailing list pgsql-general

From Nicolas Prentzas
Subject Views + Criteria
Date
Msg-id 3db6b528_4@corp.newsgroups.com
Whole thread Raw
List pgsql-general
Hello,

I am designing a complex query that needs to take data from about 10-15
tables.  To break down complexity and
I thought of splitting it into two views that make sense semantically and
use a third one to link them all together.
However, I am specifying my query criteria in the third view (for testing
now I am using constants) and the view
is very slow to open.
To find out what is wrong, I tried the same thing only with the criteria
specified as WHERE clauses in all three
views and the third view opens much faster.  Can anyone answer these
questions please:
1.  Does Postgres run all the joins and then use the criteria to limit the
amount of data?
2.  Is there a way in Postgres to send parameters from a client to the
server that will apply to
all three views?

Thanks.  Just for your info I am using v7.2.1 on linux and I want to use
Access as a client in windows.


Nicolas





-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

pgsql-general by date:

Previous
From: "peter"
Date:
Subject: Multiple Databases
Next
From: Andrew Sullivan
Date:
Subject: Re: PostgreSQL Benchmarks