MySQL - how long to create an index?

后端 未结 4 2048
悲&欢浪女
悲&欢浪女 2021-01-31 15:21

Can anyone tell me how adding a key scales in MySQL? I have 500,000,000 rows in a database, trans, with columns i (INT UNSIGNED), j (INT UNSIGNED), nu (DOUBLE), A (DOUBLE). I tr

4条回答
  •  甜味超标
    2021-01-31 15:49

    So theorically if Sorting step is a N.log(N) operation, partitionning your big table would save time on operation

    About 30 % gain for a table of 500 000 000 rows partitionned in 100 equal files : because 500 000 000* log(500 000 000)= 4 349 485 002 and 100 *(500 000 000/100*LOG(500 000 000/100)) = 3 349 485 002

提交回复
热议问题