github :https://github.com/xiaomi/soar
Installation instructions: https: //github.com/XiaoMi/soar/blob/master/doc/install.md
Source Download: https: //GOlang.google.cn/dl/
Configuration environment variable:
tar -C /usr/local -xvf go1.12.5.linux-amd64.tar
Global user variables:
vi / etc / profile
added at the end:
Export the PATH = $ the PATH: / usr / local / Go / bin
go see the version:
# go Version
source update the environment variables:
source /etc/profile
GOPATH also need to configure the environment variables: Indicates go working directory for the user name USER_NAME
export GOPATH="/home/USER_NAME/go"
[root@b28-17-55 XiaoMi]# pwd
/home/USER_NAME/go/src/github.com/XiaoMi
[root@b28-17-55 opt]# mv soar-master.zip /home/USER_NAME/go/src/github.com/XiaoMi
[root@b28-17-55 XiaoMi]# unzip soar-master.zip
[root@b28-17-55 XiaoMi]# mv soar-master soar
[root@b28-17-55 soar]# make
If successfully installed, it will eventually show success. Otherwise build error
Commonly used commands: https: //github.com/XiaoMi/soar/blob/master/doc/cheatsheet.md
[root @ b28-17-55 bin] # echo 'from the SELECT * Film' | ./soar
# Query: 687D590364E29465
★ ★ ★ ☆ ☆ 75 minutes
`` `SQL
SELECT
*
the FROM
Film
` ``
## outermost SELECT WHERE condition is not specified
* **Item:** CLA.001
* **Severity:** L4
* ** Content: ** SELECT statement has no WHERE clause, you may check more than expected lines (full table scan). For SELECT COUNT (\ *) If the type of request is not required accuracy, it is recommended to use alternative EXPLAIN or SHOW TABLE STATUS.
## is not recommended to use the type of query SELECT *
* **Item:** COL.001
* **Severity:** L1
* ** Content: ** When the table structure changes, use \ * wildcard to select all columns will lead to meaning and behavior changes when the query, the query returns may result in more data.