优化MYSQL数据库的方法
1.选取最适用的字段属性,尽可能减少定义字段长度,尽量把字段设置成not null 2.使用连接来代替子查询: a.删除没有任何订单客户:DELETE FROM customerinfo WHERE customerid NOT in(SE...
1.选取最适用的字段属性,尽可能减少定义字段长度,尽量把字段设置成not null 2.使用连接来代替子查询: a.删除没有任何订单客户:DELETE FROM customerinfo WHERE customerid NOT in(SE...
1.查询 表数据全部查询: select * from table_name; 表数据部分行展示: select * from table_name where id>2; 部分列展示: select id,name from tab...