download:Spring Security技术栈开发企业级认证与授权
全网最细致地讲解Spring Security、Spring Social 、Spring Security OAuth三种技术开发安全的REST服务,彻底掌握一线互联网公司主流的身份认证和授权方式。
适合人群及技术储备要求
本课程适合有一定的开发经验,想要深入了解认证和授权相关知识的Java开发人员
如果你对设计模式,设计思想感兴趣,这门课对你来说会有很大帮助
学前必备技术
JavaWeb基础丨Spring基础丨Maven基础
函數操作對條件字段做函數操作走不了索引。select * from t1 where date(c) ='2019-05-21';
優化:改成範圍查询select * from t1 where c>='2019-05-21 00:00:00' and c<='2019-05-21 23:59:59';
隱式轉換操作符與不同類型的操作對象一同運用時,就會發作類型轉換以使操作兼容。select user_name,tele_phone from user_info where tele_phone =11111111111; /* tele_phone varchar */
實践會做函數操作:select user_name,tele_phone from user_info where cast(tele_phone as singed int) =11111111111;
優化:類型統一select user_name,tele_phone from user_info where tele_phone ='11111111111';
含糊查询通配符在前面select * from t1 where a like '%1111%';
優化:含糊查询必需包含條件字段前面的值select * from t1 where a like '1111%';
範圍查询範圍查询數據量太多,需求回表,因而不走索引。select * from t1 where b>=1 and b <=2000;
優化:降低單次查询範圍,分屢次查询。(實践可能速度沒得快太多,倡議走索引)select * from t1 where b>=1 and b <=1000;
show profiles;
+----------+------------+------------------------------------------+
| Query_ID | Duration | Query |
+----------+------------+------------------------------------------+
| 1 | 0.00534775 | select * from t1 where b>=1 and b <=1000 |
| 2 | 0.00605625 | select * from t1 where b>=1 and b <=2000 |
+----------+------------+------------------------------------------+
2 rows in set, 1 warning (0.00 sec)
計算操作即便是简單的計算explain select * from t1 where b-1 =1000;
優化:將計算操作放在等號後面explain select * from t1 where b =1000 + 1;