MySQL and SQLite

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

MySQL and SQLite

Post 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
purefan
Forum Newbie
Posts: 15
Joined: Wed Aug 01, 2007 9:35 am

Post 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
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post 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
User avatar
ReverendDexter
Forum Contributor
Posts: 193
Joined: Tue May 29, 2007 1:26 pm
Location: Chico, CA

Post 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.
User avatar
nathanr
Forum Contributor
Posts: 200
Joined: Wed Jun 07, 2006 5:46 pm

Post by nathanr »

you really need to start using postgres yourself ReverendDexter 8O
Post Reply