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

Home -> Community -> Usenet -> c.d.o.server -> Re: Altering the ORDER BY clause based on a parameter

Re: Altering the ORDER BY clause based on a parameter

From: Preston <dontwantany_at_nowhere.invalid>
Date: Mon, 19 Nov 2007 08:53:34 GMT
Message-ID: <iac0j.9136$pg.8489@newsfe6-win.ntli.net>


jeremy wrote:

> In article <An00j.28383$mv3.7435_at_newsfe10.phx>, Ana C. Dent says...
>
>
> >
> > Dynamic SQL
> >
> Ok I know is possible with dynamic SQL, is there a way of achieving
> without using dynamic SQL?
>
> If I understand correctly, dynamic sql is less efficient (has to be
> parsed every time?) so am looking for the most efficient solution.

Dynamic SQL is about the same as static in 10g for single-row & bulk selects. I'm not sure what the difference would be with your FOR loop as 10g will bulkify that in the background, so that's something you'll need to test. Change it to a bulk collect though & dynamic will be fine (once you get on 10g).

-- 
Preston.
Received on Mon Nov 19 2007 - 02:53:34 CST

Original text of this message

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