patternsqlMinor
How many disk seeks does it take to write one row on SQLite?
Viewed 0 times
seeksdiskhowtakesqlitewriteonedoesmanyrow
Problem
As far as I understand, there can be one disk-seek per rotation of a harddisk, therefore I am interested to know how many disk seeks are needed for writing a row to an SQLite table, including locking etc. Assume that there are no indexes on the table (not even a primary key). I assume that there is one disk seek to write a line to a file? As you understand, I want to compare performance with writing the same data to a flat file.
Solution
This question was answered on Stackoverflow.
By default its one transaction per
disk rotation (roughly),
http://www.sqlite.org/faq.html#q19
The way to speedier writes is to wrap
multiple ones inside a transaction.
By default its one transaction per
disk rotation (roughly),
http://www.sqlite.org/faq.html#q19
The way to speedier writes is to wrap
multiple ones inside a transaction.
Context
StackExchange Database Administrators Q#3077, answer score: 4
Revisions (0)
No revisions yet.