Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-performancepgsql-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

pgsql-performance by date

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

pgsql-sql by date

Next:From: Josh BerkusDate: 2004-01-26 17:09:41
Subject: Re: On the performance of views
Previous:From: Shridhar DaithankarDate: 2004-01-26 15:29:46
Subject: Re: On the performance of views

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group