Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is SQLite really faster than MySQL ? [closed]

Earlier I was planning on using MySQL for doing some analysis on Netflix and Twitter data. Then I thought of giving SQLite a try. Till now my experience has been :

  1. Ratio of time to load data from a file with 100,480,057 rows & 4 columns into a DB : MySQL:sqLite :: 1:1.6

  2. Ratio of time to create an index on a given column : MySQL:sqLite :: 1:3

  3. Ratio of dropping a table ( I made a mistake and wanted to drop and restart ) :

The difference is huge. It took a lot of time to drop a table in SQLite.

I was under the impression that SQLite faster than MySQL while providing most of the functionalities needed for a normal set of tasks. What am I missing ??

like image 734
crazyaboutliv Avatar asked Jan 09 '12 13:01

crazyaboutliv


2 Answers

What made you think that SQLite is faster than MySQL?

I think, the very basic answer to your question would be that the amount of data you're trying to process fits better to MySQL

like image 165
bpgergo Avatar answered Sep 18 '22 03:09

bpgergo


See this link: http://www.sqlite.org/speed.html

Note: It's very out of date

In particular, notice that dropping tables is very slow (which explains 3.)

Also, all the tests are on relatively small datasets. I imagine most of the speedup would be due to lower latency, but I couldn't say for sure.

Also hard disk speed is likely to be a big factor, I imagine you could get a lot of speedup using an SSD

like image 36
Shawabawa Avatar answered Sep 21 '22 03:09

Shawabawa