|
List Info
Thread: Re: Views based on function returning table
|
|
| Re: Views based on function returning
table |
  United States |
2008-03-06 09:35:23 |
|
Using bulk collect is definitely useful, but doesn't answer the question of whether to use views based on functions returning collections. Most, if not any, code where you loop through a cursor could be sped up by using bulk collect. Basing a view on a function that returns a collection has advantages, as pointed out, but that in itself isn't reason to use it.
I find in coding that it's best to write code as simple as possible while meeting the requirements. It's always best to code for performance, so bulk collect yes. You may wish to add levels of security in the future, so don't give direct access to tables. Instead, access data through views, but the view only needs to be a basic view until there is a requirement that calls for a view based on a function that returns a collection. I beleive you're talking about pipelined table functions that pipe rows.
I've seen too many projects that become overly complex for no good reason other than hype. I might add that in those overly complex projects often there is poorly written SQL. Too much effort is poured into the flavor of the week and not enough into good SQL and performance planning. As the saying goes - if the shoe fits wear it. Translation - if the technique fits your needs use it, otherwise don't buy into shoes that don't fit.
My 2 cents, Ray
From: "Gabriel Tanase" <gabtanase gmail.com> Reply-To: ODTUG-WEBDEV-L fatcity.com To: Multiple recipients of list ODTUG-WEBDEV-L <ODTUG-WEBDEV-L fatcity.com> Subject: Re: Views based on function returning table Date: Thu, 06 Mar 2008 05:55:27 -0800
Hmmm, back to school then. Thanks for the corrections.
Regards,
Gabriel
On 3/6/08, Gints Plivna < gints.plivna gmail.com">gints.plivna gmail.com> wrote:
2008/3/6, Gabriel Tanase < gabtanase gmail.com">gabtanase gmail.com>: > I am saying this based on my understanding is that nowadays the SQL and
> PL/SQL engines are co-mingled (for want of a better word) and there are no > costly context switches (process + memory space) anymore when SQL calls > PL/SQL and PL/SQL passes result sets back.
Context switches do exist. And overhead as well. There are however
some explicit means to overcome that as well as implicit conversion for very limited constructs.
--
For more information on this topic or to become a member, visit our web site at http://www.ODTUG.com Be sure to check out our Seriously Practical (SP) Conferences coming up this year!
ODTUG is pleased to announce that Kaleidoscope 2008 will be held at The New Orleans Sheraton from June 15-19. Keep checking www.ODTUG.com for more details.--
Author: Raymond De Bruyn
INET: rdebruyn sympatico.ca
Fat City Hosting, San Diego, California -- http://www.fatcity.com
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ODTUG-WEBDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|