RE: [sqlite] accurate progress indication

2006-05-10 Thread Allan, Mark
isting 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 i

Re: [sqlite] accurate progress indication

2006-05-10 Thread Jay Sprenkle
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

RE: [sqlite] accurate progress indication

2006-05-10 Thread Allan, Mark
the time. Mark > -Original Message- > From: Jay Sprenkle [mailto:[EMAIL PROTECTED] > Sent: 10 May 2006 14:10 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] accurate progress indication > > > On 5/10/06, Allan, Mark <[EMAIL PROTECTED]> wrote: > > &

Re: [sqlite] accurate progress indication

2006-05-10 Thread Jay Sprenkle
On 5/10/06, Allan, Mark <[EMAIL PROTECTED]> wrote: On our target unit, it takes alot longer, deleting approx 800 records from one table and 2400 from another table will take approx 1min 30 secs. The bulk of this time is before the COMMIT, therefore before the IO stage I believe, the COMMIT

RE: [sqlite] accurate progress indication

2006-05-10 Thread Allan, Mark
006 17:44 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] accurate progress indication > > > Dennis Cote <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > Yes. To get reasonable performance you will need to enclose > > > the SELECT

Re: [sqlite] accurate progress indication

2006-05-09 Thread drh
Dennis Cote <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Yes. To get reasonable performance you will need to enclose > > the SELECT and all the individual DELETEs within a BEGIN...COMMIT. > > > Richard, > > Won't this quickly run through the select and delete commands, so that >

Re: [sqlite] accurate progress indication

2006-05-09 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Yes. To get reasonable performance you will need to enclose the SELECT and all the individual DELETEs within a BEGIN...COMMIT. Richard, Won't this quickly run through the select and delete commands, so that the progress bar quickly reaches 100%, and then sit there

Re: [sqlite] accurate progress indication

2006-05-09 Thread drh
"Allan, Mark" <[EMAIL PROTECTED]> wrote: > Thanks for your quick reply. > > > You can use a SELECT to count the number of records to be > > deleted. Then start your progress bar and do separate > > SQL statements to delete each record one-by-one, updating > > your progress bar as you go. > > I

Re: [sqlite] accurate progress indication

2006-05-09 Thread Hugh Gibson
> I have had a look at the sqlite3_progress_handler() API function but > it appears that the problem is knowing how many opcodes are required > to complete the transaction before it is run. So do this: set up sqlite3_progress_handler() with N = 1. Create a query to delete one record and count

Re: [sqlite] accurate progress indication

2006-05-09 Thread drh
"Allan, Mark" <[EMAIL PROTECTED]> wrote: > Hi, > > We would like to be able to show a (reasonably) accurate progress bar = > when we are deleting a large number of records from our database. Is = > there a way in which this can be done. We are using SQLite version = > 3.2.7. I have had a look at