- In most cases a combined index is better than 2 indexes.
- Do not use varchar() or char() aka string types of join field
- better: integer (unsigned) && same size
- e.g. actor_id id int unsigned
- Only use views with merge
- NO temptable please, these CANNOT be indexed.
- Why ? Index cannot be used.
- example:
- select first_name from actor where upper(first_name) like 'A%'
- use a virtual field and index virtual field (possible from mysql > 5.7)
- Massive improvements in mysqL 8