2021年4月11日
摘要: 方式一 DELETE FROM t_test WHERE id IN (SELECT * FROM (SELECT MAX(id) did FROM t_test GROUP BY username HAVING COUNT(*) > 1) t); 方式二 DELETE FROM t_test WH 阅读全文
posted @ 2021-04-11 23:13 landiss 阅读(39) 评论(0) 推荐(0) 编辑
摘要: 索引建立原则 1、 为经常需要排序、分组和联合操作的字段建立索引。 2、为常作为查询条件的字段建立索引 3、限制索引的数目 4、尽量使用数据量少的索引 5、数据量小的表最好不要使用索引 6、尽量使用前缀来索引 7、删除不再使用或者很少使用的索引。影响数据更新 影响数据查询的主要因素 1、磁盘I/O次 阅读全文
posted @ 2021-04-11 23:06 landiss 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 数据库安装,待完善 https://www.cnblogs.com/wendy-0901/p/12673705.html https://blog.csdn.net/yougoule/article/details/56680952 数据库启动 service mysql start; 数据库关闭 阅读全文
posted @ 2021-04-11 23:00 landiss 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 鬼畜一、delete语句表名不能加别名 DELETE FROM t_test a WHERE a.id = 1; 1 queries executed, 0 success, 1 errors, 0 warnings 查询:delete from t_test a where a.id = 1 错误 阅读全文
posted @ 2021-04-11 22:45 landiss 阅读(113) 评论(0) 推荐(0) 编辑