Reputation: 3918
I have a simple table in MySql whose raison-d'être is to store logs. The table has an autoincremented sequence and all the other columns has zero referential integrity to other tables. There are no unique keys or indexes on any columns. The column with autoincrement is the primary key.
Will concurrent INSERTs ever interfere with each other ? I define interference to mean losing data.
I am using autocommit=true for this insert.
Upvotes: 1
Views: 1023
Reputation: 6943
You'll never lose data just because you do simultaneous inserts. If you use transactions you might "lose" some IDs - but no actual data. (Imagine that you start a transaction, insert a few rows and then do a rollback. InnoDB will have allocated the auto_increment IDs , but there are no rows with those IDs because you did the rollback).
Since you don't need indexes, you should have a look at the ARCHIVE table engine. It's amazingly insanely fast -- and your tables gets much smaller which in turn makes the table scans when you read the table later MUCH faster.
Upvotes: 3
Reputation: 14225
From the MySQL manual for the MyISAM storage engine:
"MyISAM supports concurrent inserts..."
Upvotes: 2