On Tue, Aug 9, 2011 at 5:23 PM, Warren Young <mysqlpp@stripped> wrote:
> On Aug 9, 2011, at 4:11 PM, Joseph Hesse wrote:
> > I executed the same query in mysql++ and the time was 11 seconds.
> Without seeing any code, my guess is that your "SQL script" (whatever that
> is) just threw away the data, while your C++ code loaded it up into an
> in-memory data structure. The comparison is apples to oranges.
> You could probably improve the performance by using a more efficient data
> structure, but again, you cannot expect any useful advice if you're not
> going to share what you're doing now. You're asking "how do I get to
> California" without telling anyone where you are now.
Also Joe - 2 extra things that may also be an issue
1. make sure the query is being executed with SQL_NO_CACHE
2. Also learn how to read EXPLAIN and EXPLAIN extended statements.
Some links to check for performance tuning mysql.