On Fri, 3 Sep 2004, Zahraie Ramin-p96152 wrote:



-----Original Message-----
From: John LeSueur [mailto:[EMAIL PROTECTED]
Sent: Friday, September 03, 2004 11:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [sqlite] One more question on the C API performance



A 1000 rows of data return instantaneously. However when
this very query is executed through the use of the C API
using a very similar code to this:

http://www.hwaci.com/sw/sqlite/quickstart.html

The query takes about 19 seconds at best to complete. Does
anyone know why there is such a discrepancy?

Thanks very much in advance.

Regards

What does your callback do? Is it possible that's the bottleneck?


Hi John

Thanks again for the reply.  That very well may be! The call back puts the
column data in a std::map and then the std::map in std::vector. This is so
column and row data can be easily accessed. That very well may be the bottle
neck.  I will try  to come up with another way of doing this.

the std template library is a hog in this respect. if you trace the ctor's you'll see an insertion into a std container results in three of them. so if you have them nested three deep you'll call 9 ctors for each insert.

at least that's how it used to be...

-a
--
===============================================================================
| EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| A flower falls, even though we love it;
| and a weed grows, even though we do not love it. | --Dogen
===============================================================================

Reply via email to