InnoDB ou MyISAM

https://www.drupal.org/documentation/install/create-database

COLLATION utf8_general_ci  (ie UTF-8 = Unicode) =>   mysql -u username -p -e "CREATE DATABASE databasename CHARACTER SET utf8 COLLATE utf8_general_ci;"

Un UPDATE vérouille une table dans  MyISAM, mais seulement une ligne dans InnoDB.
InnoDB est préférable pour des données sensibles (intégrité), avec insert et updates fréquent ; MyISAM a de meilleurs perf mais moins orienté "intégrité des données", plus rapide pour select et affichage de données (MyISAM utilise une valeur pour chaque table du nombre de lignes par table, ainsi un simple SELECT COUNT(*) FROM table retourne rapidement la valeur - alors que InnoDB doit parcourir les clés d'index pourle faire).

 

Texte et encodage

Vers un texte qui parle de bits, ASCII et Unicode : "What every programmer absolutely, positively needs to know about encodings and character sets to work with text"
à http://kunststube.net/encoding/

- UTF-16 and UTF-8 are variable-length encodings :

character 	encoding 	bits
A 	        UTF-8 	           01000001
A 	        UTF-16 	  00000000 01000001

- Characters are referred to by their "Unicode code point". Unicode code points are written in hexadecimal (to keep the numbers shorter), preceded by a "U+"

All characters available in the ASCII encoding only take up a single byte in UTF-8 and they're the exact same bytes as are used in ASCII.

 

Voir si InnoDB ou MyISAM (si pas phpmyadmin)

Pour voir le type des tables :

SELECT TABLE_NAME, ENGINE
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'database_name'

 

Nb de tables par type : SELECT ENGINE,COUNT(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA='database_name' GROUP BY ENGINE

InnoDB ou MyISAM selon la version de drupal

Par défaut, une nouvelle installation de Drupal 7 utilise InnoDB.

Si migration de Drupal 6 vers 7 : les tables restent en MyISAM.

Plus sur le web

https://www.drupal.org/documentation/install/create-database

soucis de perf : http://dba.stackexchange.com/questions/16395/mysql-insert-performance-in...
https://www.percona.com/blog/2007/11/01/innodb-performance-optimization-...
MySQL Innodb Settings

Comparaison :

converting the storage engine (MySQL) from InnoDB to MyISAM and back (Drupal 7 specific)? https://stackoverflow.com/questions/14580919/what-are-the-consequences-o...

le cache de drupal 7 : https://www.lullabot.com/articles/a-beginners-guide-to-caching-data-in-d...
Par défaut, Drupal mets ses caches dans la base de donnée, ce n'est pas toujours le plus rapide. Ces modules (APC ou memcache) met le cache dans la mémoire du serveur, et non dans la db et est plus rapide.

logo drush