Re: Creating views

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Creating views
Дата
Msg-id 45F11BF8.4080809@archonet.com
обсуждение исходный текст
Ответ на Creating views  ("Kashmira Patel \(kupatel\)" <kupatel@cisco.com>)
Список 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Bart Degryse"
Дата:
Сообщение: Re: A form of inheritance with PostgreSQL
Следующее
От: Moritz Kobel
Дата:
Сообщение: Table inherit & foreign key problem