Decimal VS Int in MySQL?

前端 未结 4 696
名媛妹妹
名媛妹妹 2020-12-31 14:00

Are there any performance difference between decimal(10,0) unsigned type and int(10) unsigned type?

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-31 14:28

    According to this similar question, yes, potentially there is a big performance hit because of difference in the way DECIMAL and INT are treated and threaded into the CPU when doing calculations.

    See: Is there a performance hit using decimal data types (MySQL / Postgres)

提交回复
热议问题