Click to See Complete Forum and Search --> : Better query efficiency


Nestafaria
02-14-2003, 03:02 PM
I have an plsql script containing something like this:

daylist =
"01
02
...
"
hourlist =
"01
02
03
...
"
minutelist =
"00
01
...
"
for day in daylist; do
for hour in hourlist; do
for minute in minutelist; do
Select $day$hour$minute
do stuff...

I am having no problem getting this to work, but with large amounts of data it takes some time.
My question is: Is their a more efficient way to go about this??

Thanks in advance

slimdave
02-14-2003, 03:11 PM
it is not clear what you are trying to do here -- this looks like plsql -- it is not sql, i think

Nestafaria
02-14-2003, 03:16 PM
Sorry about that, yes this is PL/SQL

I am just reading in the day, hour, and minute from their respective lists and then running a select on each one. I thought there may be a better way to do this than running so many individual selects. Bascially, i am just gathering data from the DB for analysis and this is how i'm telling it what data to get.