Page 1 of 1

MySQL and SQLite

Posted: Wed Aug 01, 2007 10:19 am
by MrPotatoes
SQLite uses files to store databse information and it opens and closes them in order to get that information.

MySQL as far as i know does the same thing except it breaks up the files to become much smaller files and spreads then across. alot of the times each table is it's own file. SQLite does not do that as far as i know. it just puts it all into one file.

if you run SQLite in memory it is faster than MySQL (from thier 2005 speed comparison tests). if you have SQLite work with opening and closing the files then it becomes a much bigger overhead.

i'm just asking to learn more about databases in general and this is a question that i've had. why is it that MySQL can be really fast and SQLite not if they are both opening files? the reason i ask is because i wanted to use SQLite for databases but the application that i'm going to use could become gigantic and keeping all that in memory would not work out as well as i would like.

thank you for your responses

Posted: Wed Aug 01, 2007 10:35 am
by purefan
well im not a databases guru but MySql is more robust than SqLite, sqlite is a smaller version of (my)sql that fits into small projects, but if yours is going to grow then you want to go with the better capable guy.
Mysql has more techniques for administering memory and as you mentioned, the splitting of files is one.

Just keep in mind that Mysql is the real thing and sqlite is... the light version

Posted: Wed Aug 01, 2007 10:46 am
by MrPotatoes
down the line when i launch my company i planned to actually take SQLite and make it into a more robust version for us. great licence does that.

so it's a memory thing then? i haven't looked into the SQLite code right now mostly because i've been relearning C++ and that code would make me ache lol

Posted: Wed Aug 01, 2007 11:21 am
by ReverendDexter
purefan wrote:but if yours is going to grow then you want to go with the better capable guy
If you're going to follow that logic, Postgres would be an even better option.

Posted: Wed Aug 01, 2007 1:58 pm
by nathanr
you really need to start using postgres yourself ReverendDexter 8O