pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rich Doughty <rich@opusvl.com>
To: KeithW@NarrowPathInc.com
Cc: PostgreSQL Perform <pgsql-performance@postgresql.org>
Subject: Re: view of view
Date: Thu, 08 Dec 2005 13:46:45 +0000
Message-ID: <43983945.9020706@opusvl.com> (raw)
In-Reply-To: <43979EC0.1060400@NarrowPathInc.com>
References: <43979EC0.1060400@NarrowPathInc.com>

Keith Worthington wrote:
> Hi All,
> 
> I am working on an application that uses PostgreSQL.  One of the 
> functions of the application is to generate reports.  In order to keep 
> the code in the application simple we create a view of the required data 
> in the database and then simply execute a SELECT * FROM 
> view_of_the_data;  All of the manipulation and most of the time even the 
> ordering is handled in the view.
> 
> My question is how much if any performance degradation is there in 
> creating a view of a view?
> 
> IOW if I have a view that ties together a couple of tables and 
> manipulates some data what will perform better; a view that filters, 
> manipulates, and orders the data from the first view or a view that 
> performs all the necessary calculations on the original tables?

from personal experience, if the inner views contain outer joins performance
isn't that great.

-- 

   - Rich Doughty



view thread (3+ messages)

Message-ID: <43983945.9020706@opusvl.com>
Permalink:  ../43983945.9020706@opusvl.com/
Also on:    postgresql.org/message-id/43983945.9020706@opusvl.com

 · 

reply

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-performance@postgresql.org
  Cc: rich@opusvl.com, KeithW@NarrowPathInc.com
  Subject: Re: view of view
  In-Reply-To: <43983945.9020706@opusvl.com>

* 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