List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:August 18 2006 6:40pm
Subject:Re: how to optimize the query that returns only one result
View as plain text  
owen nirvana wrote:
> for results , we access it using iterators usually.
> But in case we will get one result apparently, we hope to directly 
> access data.
> is it possible?

Have you profiled the code?  If not, how do you know that such an 
optimization will even help?

In virtually all situations, the speed bottleneck is either I/O 
(network, disk...) or the database itself.  Unless you have a very 
unusual situation, speeding up MySQL++ should only help significanly if 
there is a massive inefficiency in the library somewhere.  The only such 
inefficiency I'm aware of is that it copies data too many times, but 
that only matters for large result sets, not small ones like what you're 
talking about.
Thread
how to optimize the query that returns only one resultowen nirvana18 Aug
  • Re: how to optimize the query that returns only one resultWarren Young18 Aug
    • Re: how to optimize the query that returns only one resultowen nirvana19 Aug