pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedCreating views
2+ messages / 2 participants
[nested] [flat]
* Creating views
@ 2007-03-09 02:03 Kashmira Patel (kupatel) <kupatel@cisco.com>
2007-03-09 08:34 ` Re: Creating views Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 2+ messages in thread
From: Kashmira Patel \(kupatel\) @ 2007-03-09 02:03 UTC (permalink / raw)
To: pgsql-sql
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.
Thanks,
Kashmira
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Creating views
2007-03-09 02:03 Creating views Kashmira Patel (kupatel) <kupatel@cisco.com>
@ 2007-03-09 08:34 ` Richard Huxton <dev@archonet.com>
0 siblings, 0 replies; 2+ messages in thread
From: Richard Huxton @ 2007-03-09 08:34 UTC (permalink / raw)
To: Kashmira Patel (kupatel) <kupatel@cisco.com>; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-03-09 08:34 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-09 02:03 Creating views Kashmira Patel (kupatel) <kupatel@cisco.com>
2007-03-09 08:34 ` Richard Huxton <dev@archonet.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox