From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | "Kashmira Patel (kupatel)" <kupatel(at)cisco(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Creating views |
Date: | 2007-03-09 08:34:00 |
Message-ID: | 45F11BF8.4080809@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Kashmira Patel (kupatel) wrote:
> Hi all, Is it possible to create views that take parameters?
> Basically, I have to create some very complex historical reports, and
> as of now I am using temporary tables to store intermediate query
> results. I calculate values based on the content of these temporary
> tables and use them in the final result. I would like to eliminate
> the need for temporary tables and use views instead, as the data copy
> between the temp tables is taking quite some time.
You can write a function (in SQL even) that would basically be a
parameterised view.
However, views don't "store" anything, so whether you see an improvement
in speed will depend on how long it takes to do your calculations.
--
Richard Huxton
Archonet Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Moritz Kobel | 2007-03-09 11:43:03 | Table inherit & foreign key problem |
Previous Message | Bart Degryse | 2007-03-09 08:28:04 | Re: A form of inheritance with PostgreSQL |