Write locally to disk, then batch insert to the database periodically (e.g. at log rollover time). Do that in a separate, low-priority process. More efficient and more robust…
(Make sure that your database log table contains a column for “which machine the log event came from” by the way – very handy!)
More Related Contents:
- Log to a database using log4j
- What is the minimal proof that a database relation is not in BCNF?
- What is the best design for a database table that can be owned by two different resources, and therefore needs two different foreign keys? [closed]
- How do I backup a database file to the SD card on Android?
- Spring Security:password encoding in DB and in applicationContext
- ADO.Net EF – how to define foreign key relation in model first approach?
- How to retrieve the last autoincremented ID from a SQLite table?
- SQL Server Connection Strings – dot(“.”) or “(local)” or “(localdb)”
- Synchronous database queries with Node.js
- How can I avoid SQL injection attacks?
- What is the recommended way to delete a large number of items from DynamoDB?
- Logging ALL Queries on a SQL Server 2008 Express Database?
- Supertype-subtype database design
- Storing time-series data, relational or non?
- Why should I use document based database instead of relational database?
- Good Free Alternative To MS Access [closed]
- SQLite insert speed slows as number of records increases due to an index
- What’s wrong with nullable columns in composite primary keys?
- wikidata get all properties with labels and values of an item
- Convert String ISO-8601 date to oracle’s timestamp datatype
- Are Cloud Firestore queries still case sensitive?
- How should you build your database from source control?
- Strange behavior in PowerShell function returning DataSet/DataTable
- Populating Spinner From SQLite Database Android
- Adding a new value to an existing ENUM Type
- Does anyone know of a good library for mapping a person’s name to his or her gender? [closed]
- Minimum GRANTs needed by mysqldump for dumping a full schema? (TRIGGERs are missing!!)
- “Cannot drop database because it is currently in use”. How to fix?
- Predict next auto-inserted row id (SQLite)
- Best beginner resources for understanding the EAV database model? [closed]