agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
[Fwd: View Vs. Table]
2+ messages / 2 participants
[nested] [flat]

* [Fwd: View Vs. Table]
@ 2007-03-06 14:40 Radhika Sambamurti <radhika@88thstreet.com>
  2007-03-06 15:52 ` Re: [Fwd: View Vs. Table] Andrew Sullivan <ajs@crankycanuck.ca>
  0 siblings, 1 reply; 2+ messages in thread

From: Radhika Sambamurti @ 2007-03-06 14:40 UTC (permalink / raw)
  To: pgsql-sql

Hi,

I have two tables which currently are being aggregated into a third table.
I am proposing eliminating or drastically shortening the 3rd aggregation
table, and instead just using a View.

Which brings me to the question, which is better? Reading from a table or
a view or is there a difference in performance?

From the application's perspective the View is much better as data is
being stored in one place, reducing errors and also storage.
But from the db point of view, is there a bigger performace hit when I
query a view Vs a table or is there no difference.

Thanks,
Radhika



-- 
It is all a matter of perspective. You choose your view by choosing where
to stand.
Larry Wall
---


-- 
It is all a matter of perspective. You choose your view by choosing where
to stand.
Larry Wall
---




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [Fwd: View Vs. Table]
  2007-03-06 14:40 [Fwd: View Vs. Table] Radhika Sambamurti <radhika@88thstreet.com>
@ 2007-03-06 15:52 ` Andrew Sullivan <ajs@crankycanuck.ca>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Sullivan @ 2007-03-06 15:52 UTC (permalink / raw)
  To: pgsql-sql

On Tue, Mar 06, 2007 at 09:40:52AM -0500, Radhika Sambamurti wrote:
> But from the db point of view, is there a bigger performace hit when I
> query a view Vs a table or is there no difference.

It rather depends on your view definition.  See the discussion of
views and, especially, the discussion of rules in the manual (views
are basically just an automatic application of certain rules).

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
Information security isn't a technological problem.  It's an economics
problem.
		--Bruce Schneier



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-03-06 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-06 14:40 [Fwd: View Vs. Table] Radhika Sambamurti <radhika@88thstreet.com>
2007-03-06 15:52 ` Andrew Sullivan <ajs@crankycanuck.ca>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox