in reply to Re: DB Question, speed is the answer!
in thread DB Question, speed is the answer!

Well, I could use place holders, don't know exactly how many rows, but it should be a lot of rows, could be thousands.
  • Comment on Re^2: DB Question, speed is the answer!

Replies are listed 'Best First'.
Re^3: DB Question, speed is the answer!
by dragonchild (Archbishop) on Jan 14, 2005 at 15:10 UTC
    Ok ... So, you have, say, 5000 rows returned. First off, you really think someone wants to read 5000 rows on a webpage? Secondly, you're going to have to do whatever it is you do within the loop 5000 times. And, since you're constructing strings within that loop, those strings are going to be taking more and more memory. The less memory you have free, the more you have to swap. Once you start swapping memory to disk, you are in a world of hurt.

    I'd try limiting the number of rows you return to no more than 100 and seeing if it helps.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      Yes, I am looking into a big table in this DB, but the data returned is small, around 10 rows, if that was what you were asking before.
Re^3: DB Question, speed is the answer!
by gellyfish (Monsignor) on Jan 14, 2005 at 15:12 UTC

    Have you tried the same query in, say, MS Access (or some other client that can use ODBC) using the same ODBC connection? I think you will find that it will take an equally long time to return all the data.

    /J\