Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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.

share|improve this question
1  
How will you compare performance? How does knowing how many seeks are involved help you compare performance? –  jcolebrand May 31 '11 at 19:49
    
@jcolebrand, I am assuming that disk seeks will be the biggest performance bottleneck when writing a row to a table. Am I wrong about this assumption? –  David May 31 '11 at 20:09
    
You might be. It all depends on what you're measuring. This is the science part of computer science. –  jcolebrand May 31 '11 at 20:13

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.