- 博客(7)
- 收藏
- 关注
原创 mysql的优化
1.查询尽量用列的名字,少用*号(用*号会扫描表).2.尽量少嵌套子查询,会消耗大量的cpu资源3.避免使用耗费资源的操作:1).DISTINCT2).UNION UNLON ALL3).ORDER BY4).MINUS5).INTERSECT6).对于有比较多or运算的查询,建议分成多个查询,用union all联接起来7).合理使用索引。...
2020-08-07 20:27:36
135
原创 mysql使用查询语句时解析器的执行顺序
1.from <表>2.where <过滤条件>3.group by <根据什么分组>4.having <过滤条件>5.select <查询的列>6.order by <怎样排序>
2020-08-07 20:07:59
292
原创 sql中的字符串拼接
一、MySQL字符串拼接1、CONCAT函数语法bai格式:CONCAT(char c1, char c2, …, char cn) ,其中char代表字符串,定长与不定长均可以连接两个字符串select concat(name, show ) from user; 连接多个字符串select concat(name,'aaa', show ) from user; 2、"+"操作符连接两个字符串select name + show from user; 连接多个字符串sel
2020-08-06 23:59:15
15380
转载 GROUP BY和having联合使用相关问题
GROUP BYGROUP BY语句用来与聚合函数(aggregate functions such as COUNT, SUM, AVG, MIN, or MAX.)联合使用来得到一个或多个列的结果集。语法如下:SELECT column1, column2, ... column_n, aggregate_function (expression) FROM tables WHERE predicates GROUP B
2020-08-01 00:02:00
1257
原创 springboot2.0+,使用put请求方式出现的访问异常
报405Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method ‘PUT’ not supported]1.在配置文件中添加(默认是关闭的)spring.mvc.hiddenmethod.filter.enabled=true2.th:href改为th:action<form th:href="@{/emp}" method="post"> <i
2020-07-28 23:34:08
529
原创 springboot2.0+,在拦截器使用上出现的静态文件访问问题
登录界面一直没有样式,但是有图标(说明静态文件我是排除掉了的)最后发现:使用了webjars 中的样式,结果忘了排除掉。加上"/webjars/**"后,问题解决@Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/**").excludePath
2020-07-27 22:53:41
134
原创 MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException
报错:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property ‘roles’ of ‘class com.itheima.ssm.domain.UserInfo’ with value ‘[Role{id=‘1111’, roleName=‘ADMIN’, roleDesc=‘vip’, pe
2020-07-03 18:53:36
1130
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人