Question

Hi, I am relatively new to using databases in a web application and I am trying to develop a dynamic application for my users.

So, I was wondering how safe is it to have your application frequently (say every 2 seconds) execute an INSERT/UPDATE query from the same user.

I'm aware that INSERT/UPDATE queries are quite slow to execute (I've read its 12 INSERT per second) but that's not my question.
My question is concerning the safety of my database.

Était-ce utile?

La solution

The frequency of executing INSERTs or UPDATEs to your database is in no way related to the safety of of your database. But it might impact its performance, that's possible.

Autres conseils

I think the concern of the OP is more about the robustness of the database's ability to handle load and not become corrupt, rather than issues of SQL injection. (Valuable comments to take note of though). The volumes suggested per user should no concern.

Database integrity for any DB should be checked with regular maintenance. Make sure you are doing the following and you should have no problems with performance and reliability.

  1. Back up your DB. Full backup and transaction log backups.
  2. Re-build and/or Re-Organize indexes
  3. Delete old data backups and check free space often.
  4. Check the maintenance logs for issues on your DB.

Then monitor performance for sufficient Memory, DISK I/O, and CPU.

wihout "with(nolock)" segment after the table name, the table being insert/update is always locked.

if so, how can it performance well

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top