download:Spring Boot + Vue3 front-end and back-end separation combat Wiki knowledge base system

Through a simple interface, complete function knowledge base project, take you to quickly master the core knowledge of Spring Boot + Vue family bucket full stack skills. In this process, build a set of general component tools (which can be applied to other projects), master the development mode of front and back end separation, and build a proprietary knowledge base system with flexible content configuration.

Technical requirements Java and MySQL Basic HTML, CSS, and JavaScript Basic Environment parameters Spring Boot 2.4 Vue3 Vue CLI 4.5 Function Operations Function operations on conditional fields fail to move indexes.

Select * from t1 where date© = ‘2019-05-21’; Optimization: Change to range query

Select * from t1 where c>= ‘2019-05-21 00:00:00’ and c<= ‘2019-05-21 23:59:59’; Implicit conversion operators, when used with different types of operation objects, perform type conversions to make operations compatible.

select user_name,tele_phone from user_info where tele_phone =11111111111; /

tele_phone varchar

/ Practice does function operations:

select user_name,tele_phone from user_info where cast(tele_phone as singed int) =11111111111; Optimization: Type unification

Select user_name,tele_phone from user_info where tele_phone = ‘11111111111’; The ambiguous query wildcard comes first

Select * from t1 where a like ‘%1111%’; Optimization: Vague queries must contain the value in front of the condition field

Select * from t1 where a like ‘1111%’; Scope query Scope query data volume is too large, need to return to the table, so do not go to the index.

select * from t1 where b>=1 and b <=2000; Optimization: reduce the range of a single query, divided into repeated queries. (Practice may not be too fast, take the index)

select

from t1 where b>=1 and b <=1000; show profiles; + — — — — — — — — — – — — — — — — — — — — — – — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — + | Query_ID | Duration | Query | + — — — — — — — — — – — — — — — — — — — — — – — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — + | | | the select 0.00534775 1

The from t1 where > = 1 b and b < = 1000 | | 2 | | 0.00605625 select * from t1 where b > = 1 and b < = 2000 | + — — — — — — — — — – — — — — — — — — — — — – — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — – + 2 rows in the set, 1 warning (0.00 SEC) operation Even a simple calculation

explain select * from t1 where b-1 =1000; Optimization: Put the calculation operation after the equal sign

explain select * from t1 where b =1000 + 1;

Turned over a lot of problem solutions, can only understand this solution, intuitive enough enough violence.

class Solution {

public:

vector restoreIpAddresses(string s) {

vector res;

for (int a = 1; a < 4; a ++ ) for (int b = 1; b < 4; b ++ ) for (int c = 1; c < 4; c ++ ) for (int d = 1; d < 4; If (a + b + c + d == s.substr(0, a)) {string s1 = s.substr(0, a); String s2 = s.substr(a, b); string s3 = s.substr(a + b, c); string s4 = s.substr(a + b + c); if (check(s1) && check(s2) && check(s3) && check(s4)) { string ip = s1 + '.' + s2 + '.' + s3 + '.' + s4; res.push_back(ip); } } } return res; } bool check(string s) // Check whether the first digit of each IP address segment is not 0 or only one digit is 0 {if (stoi(s) <= 255) if (s[0]! = '0' || (s[0] == '0' && s.size() == 1)) return true; return false; }Copy the code