we have project written in django and deployed on rpi 3.
Currently we are using mariadb with innoDB with storage on SD card.
Most of the queries are single row queries, creating m:n links or selecting whole tables but we are using lazy loading for that. We are not indexing yet, but we are going to.
We have some problems:
- SD card will wear off fast when having mysql dir on SD card. - The solution is to add USB card for mysql data.
- Performance is currently really bad when getting larger rows from m:n links. It can be more than a minute. We are refactoring the code, but it won't probably help so much. - So what to do with this? DB in RAM and slave on storage(database should be the only ram eater)? Edit my.cnf with all data in ram cache? Use postgres instead of mariadb? Also we are replicating that database to our servers for backup.