Re: On the performance of views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Moran <wmoran(at)potentialtech(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: On the performance of views
Date: 2004-01-26 16:43:37
Message-ID: 8197.1075135417@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance pgsql-sql

Bill Moran <wmoran(at)potentialtech(dot)com> writes:
> At first I was going to just convert all MSSQL procedures to Postgres functions.
> But now that I'm looking at it, a lot of them may be candidates for views. A
> lot of them take on the format of:

> SELECT a.cola, b.colb, c.colc
> FROM a JOIN b JOIN c
> WHERE a.prikey=$1

You'd probably be better off using views, if making that significant a
notational change is feasible for you. Functions that return multiple
columns are notationally messy in Postgres. A view-based solution would
be more flexible and likely have better performance.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2004-01-26 17:09:41 Re: On the performance of views
Previous Message Greg Stark 2004-01-26 16:16:28 Re: High Performance/High Reliability File system on SuSE64

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2004-01-26 17:09:41 Re: On the performance of views
Previous Message Shridhar Daithankar 2004-01-26 15:29:46 Re: On the performance of views