in reply to DB Question, speed is the answer!

It's hard to say. It could be that most of the time is spend in the database - if so, you need to reconfigure/redesign your database/table/indices or query.

But there is one thing in your while loop that could suck up lots of resources, and that's the pushing onto @array_account. If there's a lot to be fetched from the database, @array_account will get huge - and because it grows by bits and pieces, a lot of allocation of memory will happen. That will take time, specially if you're using significant amounts of it. Do you actually need all the data into one array?

Replies are listed 'Best First'.
Re^2: DB Question, speed is the answer!
by Anonymous Monk on Jan 14, 2005 at 15:22 UTC
    Yes I do, like I mentioned before the results shouldn't be that big, it's an array with a number of possible 10 account numbers in it, that gets into another sql call later in the code.