博客专栏推荐
-
1177338次
-
122015次
-
56769次
-
29259次
本月博客排行
年度博客排行
-
第1名
青否云后端云 -
第2名
zw7534313 -
第3名
大家都说我很棒 - liyihz2008
- wy_19921005
- hbxflihua
- 腾讯优测1
- e_e
- ning2-eye
- wallimn
- dbagirl
- gengyun12
- luxurioust
- zysnba
- itdatacenter
- alsmile
- robotmen
- xiangjie88
- johnsmith9th
- gaozzsoft
- jywhltj
- fantaxy025025
- zhangdaiscott
- chinahuyong
- 淡看人生
- leslie26
- sichunli_030
- cuityang
- kaizi1992
- jveqi
- mukeliang728
- cpongo1
- hellohank
- zlr
- weiyides
- hanbaohong
- appalese
- jickcai
- zhaoshijie
- lzyfn123
- jackpot1234
- qepwqnp
- ranbuijj
- 解宜然
- lyongq04
- xpenxpen
- ssydxa219
- gdpglc
- java-007
最新文章列表
with as insert into报1064
with as后面直接跟insert into select会报1064:
with temp_table as (select * from table limit 1)
insert into table
select *
from temp_table
where 1=2
with as放在select之前即可正常插入:
...
关键字:性能优化重要的mysql profile功能
mysql的sql语句优化都使用explain,但是这个没有办法知道详细的memory/cpu等使用量
mysql query profiler, 可以查询到此 sql 语句会执行多少, 并看出 cpu/memory 使用
量, 执行过程 system lock, table lock 花多少时间等等.
mysql> show ...
对于innodb表,optimize table被映射到alter table上,这会重建表。重建操作能更新索引统计数据并释放成簇索引中的未使用的空间。
注意:在optimize table运行过程中,mysql会锁定表。
最好使用删除在创建索引
有171人浏览
2022-07-13 11:38
前提:
本地内网window机器上安装了mysql服务,该机器上可以正常使用mysql命令访问,但是内网其他的机器无法访问。
1)使用ping xx.xx 是正常的
2)使用telnet xx.xx 3306 报错。
排查:
1) 首先查看的是mysql的用户授权, 登录mysql看了下库mysql里面的用户权限,root用户有“localhost” 和 “%”权限,说明就不是ip限制的,所以 ...
有336人浏览
2022-07-02 09:32
sql删除指定条件的重复数据两个属性,只保留一条
delete c from ceshi c
join (
select count(id), min(id) id, idcard,idcount from ceshi group by idcard,idcount having count(id )>1
) tmp on c.idcard = tmp.idcard and ...
有513人浏览
2022-06-15 10:19
windows系统
1、资源下载
m6手机网页版登录官网下载地址:https://dev.mysql.com/downloads/mysql/
2、解压、配置
解压,在根目录配置my.ini文件(ansi编码)
手动创建e:\\mysql目录
[mysqld]
# 设置3306端口
port=3306
# 设置mysql的安装目录,修改根目录名称,一定要与上面的安装路径保持一致
basedir=d: ...
有94人浏览
2022-03-23 21:45
今天,用sts4.11.1(springboot tools suite 4)开发了一个基于springboot的测试工程,项目使用了mysql, mybatis,maven技术。首先看工程目录结构,(不能上传图片),直接上代码吧
要新建一个工程,数据库是基础, 使用mysql数据库,在mysql库上建表做数据处理,数据库建库脚本:
drop table emp_info;
creat ...
有299人浏览
2021-12-08 15:27
alter table `table_name` add primary key ( `column` )
'table_name' 表名
column 字段
将table_name表的column字段设置为主键;
alter table `table_name` add unique ( `column` );
写法一:alter table `table_name` add index ...
有203人浏览
2021-10-04 23:40
« 上一页 1 …