Long running processes and commit writing to disk

Started by Shaozhong SHIabout 4 years ago5 messagesgeneral
Jump to latest
#1Shaozhong SHI
shishaozhong@gmail.com

When long running processes got disrupted, one may not see any expected
result.

How to make sure that the result of each operation is saved to disk in a
loop?

Regards,

David

#2Shaozhong SHI
shishaozhong@gmail.com
In reply to: Shaozhong SHI (#1)

When long running processes got disrupted, one may not see any expected
result.

How to make sure that the result of each operation is saved to disk in a
loop?

Regards,

David

#3Mike Sofen
msofen@runbox.com
In reply to: Shaozhong SHI (#1)
RE: Long running processes and commit writing to disk

From: Shaozhong SHI <shishaozhong@gmail.com> Sent: Friday, April 08, 2022 9:39 AM

When long running processes got disrupted, one may not see any expected result.

How to make sure that the result of each operation is saved to disk in a loop?

Regards,

David

Simple: don’t use a database – you’re asking to violate ACID.

A database’s power comes from set-based operations. You’re asking to do single row operations. Use a spreadsheet...or a plain text file and treat it like a log.

Mike

#4Rob Sargent
robjsargent@gmail.com
In reply to: Mike Sofen (#3)
Re: Long running processes and commit writing to disk

On 4/8/22 10:52, Mike Sofen wrote:

*From:* Shaozhong SHI <shishaozhong@gmail.com> *Sent:* Friday, April
08, 2022 9:39 AM

When long running processes got disrupted, one may not see any
expected result.

How to make sure that the result of each operation is saved to disk in
a loop?

Regards,

David

Simple:  don’t use a database – you’re asking to violate ACID.

A database’s power comes from set-based operations.  You’re asking to
do single row operations.  Use a spreadsheet...or a plain text file
and treat it like a log.

Mike

Or commit every loop (perhaps every N loops, depending on how much
you're prepared to re-do.)

#5Ron
ronljohnsonjr@gmail.com
In reply to: Shaozhong SHI (#2)
Re: Long running processes and commit writing to disk

On 4/8/22 11:39, Shaozhong SHI wrote:

When long running processes got disrupted, one may not see any expected
result.

How to make sure that the result of each operation is saved to disk in a loop?

That would of course depend on how often you begin and commit transactions.

--
Angular momentum makes the world go 'round.