1.??????????SQL

????????????????????????????????????????????SQL???????С???????????????С????????????????????????

2.????????????

???? insert????Load data into table??????????????????????

???飬??????????????????????????????????????????????

?????myisam?????裺

Alter table table_name disable keys; ???????????

?????????

Alter table table_name enable keys; ????

???innodb?????裺

Drop index, drop constraint ???????????????????????

Begin transaction|set autocommit=0; ???????????????????

[???????????????????????]

?????????

Commit;

Add index, add constraint

3.???

??????Limit offset, size; size = 10;

Page

offset

5

40, 10

50

490, 10

5000

4990, 10

500000

499990, 10

 

Limit ????????????????Ч?????????????????????????????????????????????????????????????????????????????????????????????????????????λ??????????????

4.?????Щ???????????Order by Rand()

????????????????????????rand()?????????

??????飬???mt_rand()???????????????????????????л???????

????????

APM???????/???·?????????