Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Efficiency question with PL/SQL code.

Re: Efficiency question with PL/SQL code.

From: Michael Rothwell <marothwell_at_yahoo.com>
Date: Fri, 31 Mar 2000 08:48:30 -0800
Message-ID: <38E4D6DE.8DB0AE59@yahoo.com>


K Stahl wrote:

>
> I think this is something that a lot of programmers don't understand. If
> you have a table with four columns, there is no performance gain by only
> selecting one column because the engine still has to do as much work as if
> you requested all four columns.
>

True, however there is a network difference, especially if moving data accross the web or some other slow network, or if the fields are quite large. The SQL engine still does the same amount of work but the network moves much less data.

>
> What I would probably do in this type of situation is have a user-defined
> recordset anchored on the table/view if it only involves a single
> table/view or on the cursor if the cursor is a join. When rows are fetched
> from the cursor the values would be placed in this recordset and then I'd
> programatically determine which columns I want to use at any discrete point
> in my program. The big advantage to this is that if the algorithm changes
> in the future it will be easier to maintain the program.
Received on Fri Mar 31 2000 - 10:48:30 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US