Sqladvisor (American mission) deployment record

Source: Internet
Author: User
Tags percona git clone

[Email protected] ~]# RPM-IVH epel-release-6-8.noarch.rpm

[Email protected] ~]# RPM-IVH percona-release-0.1-4.noarch.rpm


[email protected] ~]# Yum install-y cmake libaio-devel libffi-devel glib2 glib2-devel

[email protected] ~]# Yum install-y percona-server-shared-55


[[email protected] ~]# git clone https://github.com/Meituan-Dianping/SQLAdvisor.git

Initialized Empty Git repository in/root/sqladvisor/.git/

Remote:counting objects:1460, done.

Remote:total 1460 (Delta 0), reused 0 (Delta 0), pack-reused 1460

Receiving objects:100% (1460/1460), 19.92 MiB | 109 kib/s, done.

Resolving deltas:100% (368/368), done.


[Email protected] ~]# CD Sqladvisor

[Email protected] sqladvisor]# cmake-dbuild_config=mysql_release-dcmake_build_type=debug-dcmake_install_prefix=/ Usr/local/sqlparser./

[[email protected] sqladvisor]# make && make install


[Email protected] sqladvisor]# CD Sqladvisor

[Email protected] sqladvisor]# cmake-dcmake_build_type=debug.

[[email protected] sqladvisor]# make

[email protected] sqladvisor]# CP Sqladvisor/usr/bin


[Email protected] ~]# sqladvisor--help

Usage:

Sqladvisor [OPTION ...] sqladvisor


SQL Advisor Summary


Help Options:

-?,--help Show Help options


Application Options:

-F,--defaults-file Sqls file

-U,--username username

-P,--password password

-P,--port port

-H,--host host

-D,--dbname database name

-Q,--sqls Sqls

-V,--verbose 1:output logs 0:output nothing


[Email protected] ~]# VI sql.cnf

[Sqladvisor]

Username=tpcc

Password=tpcc

host=192.168.1.200

port=3306

dbname=tpcc1000

Sqls=select * from Warehouse;


[Email protected] ~]# sqladvisor-f sql.cnf-v 1

2018-02-13 09:04:31 20618 [Note] step 1th: Sql:select ' * ' as ' from ' tpcc1000 ' after SQL parsing is optimized. ' Warehouse '


2018-02-13 09:04:31 20618 [Note] 2nd step: Table Warehouse SQL too inverse day, no optimization suggestions


2018-02-13 09:04:31 20618 [Note] 3rd step: Sqladvisor end!


Sqladvisor (American mission) deployment record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.