On 2/7/07, John Stanton <[EMAIL PROTECTED]> wrote:
DragonK wrote: > On 2/7/07, Ken <[EMAIL PROTECTED]> wrote: > >> >> Try without the pragma and wrap the inserts with a begin transaction >> and a >> commit... >> >> The performance will be almost as good as with the pragma, with the >> added benefit of consistent data and no corruption in the event of a >> crash >> or power failure. > > > > I know, but in my case, I can't use transactions due to the architecture of > the product. Why not? Can't you just execute SQL?
Well, using transactions would be a little difficult, because I have a library which does something like logging to a database. Using transaction on a single insert would be useless in my opinion, and on the other hand I can't use transactions on the all inserts, since logging is a continuous process, it doesn't end.
> > > DragonK <[EMAIL PROTECTED]> wrote: > >> On 2/7/07, Teg wrote: >> > >> > Hello ohadp, >> > >> > Well, my experience is, particularly when it's users using it and not >> > a personal project, that corruption happens fairly frequently when you >> > use this pragma. That's why I don't use it any more in my production >> > code. >> > >> > Transactions are far safer and fast too. >> > >> > Indeed, transactions are safer. >> >> But I wonder, why did you experienced corruption with this pragma? Was it >> because of crashes of the OS or the application? Or are there other >> factors >> which can corrupt the data if not syncing ? As I understood from the >> documentation, the only thing that can corrupt data when using this >> pragma >> are crashes and power failures. >> >> >> >> -- >> ...it's only a matter of time... >> >> > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------
-- ...it's only a matter of time...