From: Bruno Wolff III <bruno@wolff.to>
To: radhika@88thstreet.com
Cc: pgsql-sql@postgresql.org
Subject: Re: View Vs. Table
Date: Fri, 9 Mar 2007 09:01:35 -0600
Message-ID: <20070309150135.GB23704@wolff.to> (raw)
In-Reply-To: <13619.63.118.86.10.1173191539.squirrel@www.88thstreet.com>
References: <13619.63.118.86.10.1173191539.squirrel@www.88thstreet.com>
On Tue, Mar 06, 2007 at 09:32:19 -0500,
Radhika Sambamurti <sushi@88thstreet.com> wrote:
>
> 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.
In postgres, views are essentially macros and there shouldn't be a big
performance hit for using them over issuing the equivalent query.
It sounds like what you might be asking is comparing views to storing
data in denormallized tables (esentially materialized views). You generally
don't want to go there unless you need to, to get acceptible performance.
(And note that denormallizing data doesn't always get you better performance.)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bruno@wolff.to, radhika@88thstreet.com
Subject: Re: View Vs. Table
In-Reply-To: <20070309150135.GB23704@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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