Dear Stephen,

Thanks for the reply. As you said we checked the EXPLAIN QUERY PLAN with our
query and it has shown that all the four tables we use in the query are
using their indexes and there is no ORDER BY class in our query. So
sqlite3_prepare compiles the query and sqlite3_step executes the query does
it mean the execution time for our query is 40 secs because we are
retrieving the records soon once gets executed.

Regards
Kartthi

Stephen Oberholtzer wrote:
> 
> On Tue, May 27, 2008 at 9:06 AM, sqlite <[EMAIL PROTECTED]>
> wrote:
> 
>>
>> Dear All,
>>
>> We are using SQLite for our application development which would be
>> deployed
>> in a pocket pc. Here we are using a query which has three Inner joins
>> ,while
>> using sqlite3_prepare statement  we can able to prepare the  records soon
>> where as in sqilte3_step function we are facing a problem to fetch first
>> record which makes more time, it takes around 40 seconds to get the fetch
>> the first record whereas all other records are fetched quickly with in a
>> fraction of second. We facing similar kind of problem each time while
>> getting first record using Where condition or inner joins, kindly help us
>> in
>> this regard.
>>
>> Thanks in Advance,
>>
>> Regards,
>> Kartthi
> 
> 
> With no information as to how your database is being formed, I would start
> with:
> 
> 0.  "sqlite3_prepare" does not prepare the data, it just prepares the
> program that will be used to fetch the data.
> 1.   Try EXPLAIN QUERY PLAN [your select statement here] and see what it
> says.  If any of the joins are *not* using an index, that would be a
> problem.
> 2.  Are you using an ORDER BY?  That would mean SQLite has to process the
> entire query (in order to sort the results) before returning the first
> row.
> 
> 
> -- 
> -- Stevie-O
> Real programmers use COPY CON PROGRAM.EXE
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SQLite-Step-Function-tp17490036p17505065.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to