-1

What is the best way of storing and querying data for a simple tasks management application (e.g.)? The goal is to have maximum performance with minimum resources consumption (CPU, disk, RAM) for a single EC2 instance.

Community
  • 1
  • 1
Igor Romanov
  • 1,689
  • 2
  • 19
  • 36

1 Answers1

1

This depends also on the use case - will it be the database with many reads or many writes? When you are talking about tasks management, you have to know how many records do you expect, and if you expect more INSERTs or more SELECTs, etc.

Regarding SQL databases, interresting benchmark can be found here:

The benchmark shows that SQLite can be in many cases very fast, but in some cases also uneffective. (unfortunately the benchmark is not the newest, but still may be helpful)

SQLite is also good in the way it is just a single file on your disk that contains whole database and you can access the database using SQL language.

Very long and exhausting benchmark of the No-SQL can be found i.e. here:

It is also good to know the database engines, i.e. when using MySQL, choose carefully between MyISAM and InnoDB (nice answer is here What's the difference between MyISAM and InnoDB?).

If you just want to optimize performance, you can think of optimizing using hardware resources (if you read a lot from the DB and you do not have that many writes, you can cache the database (innodb_cache_size) - if you have enough RAM, you can read whole database from RAM.

So the long story short - if you are choosing engine for a very simple and small database, SQLite might be the minimalistic approach you want to use. If you want to build something larger, first be clear about your needs.

Community
  • 1
  • 1
Marek Galinski
  • 435
  • 1
  • 5
  • 16
  • Great answer, thanks. I have SQLite on my list, was hoping to discover even more lightweight solutions. Having full-blown SQL is an overkill. – Igor Romanov Jun 05 '15 at 23:35