In MySQL, is there a difference (in terms of performance) between decimal and double?

In my database, I would like to save the decimal point. The score may have a value from 0 to 10 and values ​​between them, for example 2.3 or 9.4.

I recently found out that int only stores integers, not decimal numbers. I found out that you can use either double or decimal , but what I would like to know is any difference?

I am currently using a decimal number.

+3
source share
2 answers

Decimal numbers are more accurate, doubles, as a rule, more efficiently.

, .
: , .

, , . , .

. MySQL.

+7

INT 0 100? , .

/.

+1

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


All Articles