oracle - Should I commit after each SQL action, or do multiple actions and then commit? Which is more efficient? -



oracle - Should I commit after each SQL action, or do multiple actions and then commit? Which is more efficient? -

i need clarification on sql scenario of sql commits.

for example:

1) delete tablename column_name = 'value'; commit above transaction; versus 2) (i...n){ delete tablename column_name ('value'); } commit after 'n' transactions..

consider n >=10, in case stress on db improve compared 1st approach or 2nd approach have same effect 1st approach... know best approach pass multiple values in clause... need know if 2nd improve 1st one>?

committing every n transactions indeed faster , nicer database logging facilities. trade-off how much info willing lose if have restart process.

e.g., have 10,000,000 batch rows load. if process crashes @ row number 7,543,232, how many rows can afford have load again?

and yes, you'd prepare statement bind parameters (? marks) values , execute on statement handle each row of values.

sql oracle transactions commit

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -