Re: [sqlite] COMMIT versus END
Right; I was thinking of checkpoint stuff, in a sense. Smaller transactions make things waaay slower :) . --Keith On Fri, 11 Mar 2005 14:03:45 -0500 (EST), Clay Dowling <[EMAIL PROTECTED]> wrote: > > Keith Herold said: > > I have a batch process that commits sets of 25 pre-built sql scripts > > on a timed basis. I have been wrapping the execution of all 25 sets > > in a single begin...end transaction set. The problem is that if any > > of those scripts fails to execute properly, than all 25 scripts are > > rolled back. It would be nice to get a bit better granuality, with > > partial commits or something. > > That's pretty much the definition of a transaction. Everything succeeds > or everything fails. Smaller transactions are what you want. The things > that should succeed or fail together go in the same transaction. > > Clay Dowling > -- > Lazarus Notes from Lazarus Internet Development > http://www.lazarusid.com/notes/ > Articles, Reviews and Commentary on web development > -- ** - Ever notice how 'big' isn't, compared to 'small'? - I'm not a professional; I just get paid to do this. - Rules for programming: 1. Get it working, right? 2. Get it working right. - Things I've learned about multithreaded programming: 123... PPArrvooottieedcc ttm ueelvvteeirrtyyhtt rhheiianndgge dwi hnpi rctohhg eri aslm omscitanalgt iowcbh,je engceltvo ebwrah lip,co hso srci abonlt ehb .ee^Nr waicscee snsoetd 'aotb jtehcet -slaomcea lt'il m^Ne from two or more threads **
Re: [sqlite] COMMIT versus END
On Fri, 2005-03-11 at 10:20 -0800, Keith Herold wrote: > Is there a difference between COMMIT and END TRANSACTION ? > > I have a batch process that commits sets of 25 pre-built sql scripts > on a timed basis. I have been wrapping the execution of all 25 sets > in a single begin...end transaction set. The problem is that if any > of those scripts fails to execute properly, than all 25 scripts are > rolled back. It would be nice to get a bit better granuality, with > partial commits or something. > > Enter COMMIT. Does it allow you to commit portions of the sql > scripts? I.e., could I start a BEGIN TRANSACTION; then at the end of > each script execute a COMMIT to successfully commit that portion, and > then proceed to the end, and END TRANSACTION. That way, if somewhere > down the line, I lose the 15th file, at least the first 14 are in the > database. > COMMIT and END are the same thing. To do what you are trying to do above, you should COMMIT then immediately do another BEGIN. -- D. Richard Hipp <[EMAIL PROTECTED]>
[sqlite] COMMIT versus END
Is there a difference between COMMIT and END TRANSACTION ? I have a batch process that commits sets of 25 pre-built sql scripts on a timed basis. I have been wrapping the execution of all 25 sets in a single begin...end transaction set. The problem is that if any of those scripts fails to execute properly, than all 25 scripts are rolled back. It would be nice to get a bit better granuality, with partial commits or something. Enter COMMIT. Does it allow you to commit portions of the sql scripts? I.e., could I start a BEGIN TRANSACTION; then at the end of each script execute a COMMIT to successfully commit that portion, and then proceed to the end, and END TRANSACTION. That way, if somewhere down the line, I lose the 15th file, at least the first 14 are in the database. Or is COMMIT a synonym for END TRANSACTION? -- Keith ** - Ever notice how 'big' isn't, compared to 'small'? - I'm not a professional; I just get paid to do this. - Rules for programming: 1. Get it working, right? 2. Get it working right. - Things I've learned about multithreaded programming: 123... PPArrvooottieedcc ttm ueelvvteeirrtyyhtt rhheiianndgge dwi hnpi rctohhg eri aslm omscitanalgt iowcbh,je engceltvo ebwrah lip,co hso srci abonlt ehb .ee^Nr waicscee snsoetd 'aotb jtehcet -slaomcea lt'il m^Ne from two or more threads **