1 I was asked for help in optimizing a MySQL query where flags are stored in a database and references should be counted based on the flag value.
2 Sounds not complicated at first, but there are several flags that should be counted and also just once per reference.
3 CREATE TABLE user ( id int unsigned AUTO_INCREMENT KEY, name varchar(64) NOT NULL, lang_de tinyint unsigned not null, lang_en tinyint unsigned not n..