随笔分类 -  MYSQL

摘要:一.创建索引 1.建立表后创建索引 ALTER TABLE 表名 ADD [UNIQUE 唯一索引 | FULLTEXT 全文索引| SPATIAL 空间索引] INDEX | KEY [索引名] (字段名1 [(长度)] [ASC | DESC]) [USING 索引方法]; CREATE [UN 阅读全文
posted @ 2021-08-23 23:50 工具人的自觉 阅读(42) 评论(0) 推荐(0)
摘要:转载地址 : https://blog.csdn.net/weixin_41558728/article/details/81704916 阅读全文
posted @ 2021-08-23 23:25 工具人的自觉 阅读(62) 评论(0) 推荐(0)
摘要:show profile是由Jeremy Cole捐献给MySQL社区版本的。默认的是关闭的,但是会话级别可以开启这个功能。开启它可以让MySQL收集在执行语句的时候所使用的资源。为了统计报表,把profiling设为1 1·设置 mysql> SET profiling = 1; 2.执行查询语句 阅读全文
posted @ 2021-08-23 23:23 工具人的自觉 阅读(95) 评论(0) 推荐(0)
摘要:-- 查看 指定 数据库里面表的情况 select table_name,table_rows from information_schema.tables where TABLE_SCHEMA = '数据库名称' order by table_rows desc; 阅读全文
posted @ 2021-07-13 22:41 工具人的自觉 阅读(35) 评论(0) 推荐(0)
摘要:1.登录mysql ,输入命令mysql -u root -p指定 root 用户登录 MySQL,输入后按回车键输入密码。如果没有配置环境变量,请在 MySQL 的 bin 目录下登录操作。 2.1 输入指令 set password for username @localhost = passw 阅读全文
posted @ 2021-07-13 21:43 工具人的自觉 阅读(85) 评论(0) 推荐(0)
摘要:一、下载安装包: 进入mysql官网 https://www.mysql.com/ 下载免安装版 阅读全文
posted @ 2021-05-16 10:15 工具人的自觉 阅读(35) 评论(0) 推荐(0)
摘要:mysql select * from information_schema.columns where table_name = '表名' and TABLE_SCHEMA='数据库名' sql server select * from information_schema.columns whe 阅读全文
posted @ 2021-01-12 15:04 工具人的自觉 阅读(369) 评论(0) 推荐(0)