List:MySQL++« Previous MessageNext Message »
From:Erwin Date:April 30 2005 3:14pm
Subject:Re: Fetching the result from the database takes linear time
View as plain text  
> >I think the problem may be caused by the const_subscript_container as a
> >base for Result, 
> Chris nailed it: you should be using Query::use(), and therefore ResUse 
> instead.  Instead of trying to store all the records in memory, a "use" 
> query grabs the records from the server one at a time, and you process 
> them linearly.  It's like the difference between a random access 
> iterator into a vector and an input iterator into an I/O stream.

Yes, that completely solved it. However I used the Result because it has
the nice iterator, which ResUse does not have. So, I'm writing one in
stead, which I will submit later this week. (If anyone's interested).

> I'm working on the documentation now, and will add a section to make 
> this clearer.

That would be very nice; the documentation was a bit 'lacking'.

Erwin

-- 
erwin@stripped
Thread
Fetching the result from the database takes linear timeErwin28 Apr
  • Re: Fetching the result from the database takes linear timeChris Frey29 Apr
  • Re: Fetching the result from the database takes linear timeWarren Young29 Apr
    • Re: Fetching the result from the database takes linear timeEarl Miles29 Apr
    • Re: Fetching the result from the database takes linear timeErwin30 Apr
      • Re: Fetching the result from the database takes linear timeWarren Young30 Apr
        • Re: Fetching the result from the database takes linear timeErwin30 Apr
          • Re: Fetching the result from the database takes linear timeWarren Young2 May