Re: View vs Stored Proc Performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 11, 2009 at 5:27 PM, Jason Tesser <jasontesser@xxxxxxxxx> wrote:
> Right what I was wondering is is this better done in a view? or a stored
> proc?   I am guessing based on your initial response the view is better
> performance.  These are the types of queries I will be doing though.
>

in performance terms the view should be faster if you are doing things
like joining the result to another table...the planner can see
'through' the view, etc.  in a function, the result is fetched first
and materialized without looking at the rest of the query.  the actual
mechanism you use to build the arrays is likely going to be more
important than anything else.

merlin

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux