Jay,

Yes we debug on our target using a serial link to the PC and catching printf 
statements in hyperterminal. From this we can deduce that it is the line of 
code:-

sqlite3_exec( m_hDatabase, strSQL, NULL, NULL, NULL )

where strSQL is "DELETE FROM EXAMINATIONS WHERE DATE < datetime('2006-05-09 
00:00:00')"

that is taking the time.

We have not tried to place printf statements within SQLite to determine what is 
taking the time internally to SQLite.

Note: the performance problem is not a new issue, only the ability to display a 
progress bar was new. There is an existing thread on this archived at:-
http://www.mail-archive.com/sqlite-users@sqlite.org/msg10818.html

Thanks

Mark

> -----Original Message-----
> From: Jay Sprenkle [mailto:[EMAIL PROTECTED]
> Sent: 10 May 2006 15:16
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] accurate progress indication
> 
> 
> On 5/10/06, Allan, Mark <[EMAIL PROTECTED]> wrote:
> > Jay,
> >
> > Yes there is a index on the date column. The delete 
> operation is on date, specifically dates older than a date 
> entered by the user (so he/she can clear out old records and 
> keep newer ones). I don't think the time taken is slowed by 
> the time SQLite takes to find the rows as I do a SELECT COUNT 
> with the same query and this does not take as long as the 
> DELETE. I don't know why it takes so long, I dont think it is 
> the writing to the file as this should only happen on COMMIT 
> and I can see in debug output that the COMMIT only takes a 
> few seconds. It is before COMMIT that takes the time.
> 
> 
> Is it possible to use a profiler tool on your embedded system?
> One technique I've seen for debugging systems like that is to 
> make a null modem
> cable (either serial or parallel) and hook the embedded 
> system to a terminal
> or another computer. You can then put write statements into 
> your code to
> write debugging info to the port for collection and analysis. 
> It's pretty
> simple if you don't have any better tools. You can at least 
> see what part
> of the code is taking so long to execute.
> 
> 


DISCLAIMER:
This information and any attachments contained in this email message is 
intended only for the use of the individual or entity to which it is addressed 
and may contain information that is privileged, confidential, and exempt from 
disclosure under applicable law.  If the reader of this message is not the 
intended recipient, or the employee or agent responsible for delivering the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution, forwarding, or copying of this communication is 
strictly prohibited.  If you have received this communication in error, please 
notify the sender immediately by return email, and delete the original message 
immediately.

Reply via email to