Hi,   I am working on embedded arm linux.I am trying to extract records form a 
local database of sqlite using QT Application. My local database is of size 
2.6MB and contains almost 1.2 lakh records , each record has three fields (ID, 
name, address). I am trying to extract all the records from database and store 
it in a single QByteArray (equivalent to char array ) variable. But the 
extraction procedure is very slow. It took me 3 hours to extract the entire 
data (on ARM9 device with 200MHz clock). While the same code on  a Intel Core 2 
duo 2.93GHz PC with linux took less than two minutes for the entire extraction. 
On the ARM device, I use NAND flash as the storage medium and yaffs2 as the 
file system. 
The code segment is given below:
  QString str="select * from table_user20";   query_model.setQuery(str);    
i=0;    while(query_model.record(i).value("Id").toByteArray()!="")    {       
data+=query_model.record(i).value("Id").toByteArray();       
data=data+unit_sp;       data 
+=query_model.record(i).value("Name").toByteArray();       data=data+unit_sp;   
    data +=query_model.record(i).value("Address").toByteArray();       data 
+=record_sp;        i++;     }
Is the system supposed to take this amount of time on a ARM base embedded 
device ?    Is there any better way to extract data ?
With RegardsGIGIN





_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to