Mysql is a good table: a table with more than one index?

Excuse me,

I have this mini-table with 3 columns, but I will list the values ​​with either one or the other column.

1) Is it good to have two columns with indexes?

2) Should there be only one index for a table?

3) At the limit, if we have a table with 100 columns, for example, and we have 50 of them with indexes, is this normal?

Thanks MEM

+3
source share
3 answers

Good to have many indexes, even multiple indexes in the same table, if you use them.

EXPLAIN , . , , . .

, .

+5

, , .

,

  • MySQL ,

: , , , . .

+1

, :

  • , ,
  • . .
  • , , , . . , ( DISK), , (INSERT/UPDATE/DELETE) , INDEX.

. , .

+1

Source: https://habr.com/ru/post/1764483/


All Articles