Sqladvisor use (Centos6.8 version)

Source: Internet
Author: User
Tags percona

Sqladvisor is an analytical SQL provided by the company's technical engineering Department's DBA team (Beijing) to develop and maintain a tool for index optimization recommendations. Based on the original ecological lexical analysis of MySQL, this paper combines the Where condition, aggregation condition and multi-table join relation in SQL to give the index optimization suggestions. Currently sqladvisor is widely used in the United States, including corporate payment, hotel tours, take-away, buy and other product lines, the company's internal development of sqladvisor to GitHub, open source and internal use consistent.
Key Features: Output SQL Index Tuning recommendations

Download the installation package: sqladvisor-2.0.tar.gz

Rpm-q cmake libaio-devel libffi-devel glib2 glib2-devel
Yum install cmake libaio-devel libffi-devel glib2 glib2-devel
#在SQLAdvisor编译时需要这个
RPM-IVH percona-release-0.1-3.noarch.rpm


TAR-XVF Percona-server-5.6.29-76.2-rddf26fe-el6-x86_64-bundle.tar


RPM-IVH percona-server-server-56-5.6.29-rel76.2.el6.x86_64.rpm--nodeps
RPM-IVH percona-server-client-56-5.6.29-rel76.2.el6.x86_64.rpm--nodeps
RPM-IVH percona-server-devel-56-5.6.29-rel76.2.el6.x86_64.rpm--nodeps

Installation of #以上三个rpm包仅仅为了完成Percona server
Cd/usr/lib64
Ln-s libperconaserverclient_r.so.18 libperconaserverclient_r.so


Package Installation

TAR-ZXVF sqladvisor-2.0.tar.gz


(2) Installation Sqlparser analysis
CD SQLAdvisor-2.0
Cmake-dbuild_config=mysql_release-dcmake_build_type=debug-dcmake_install_prefix=/usr/local/sqlparser./
Attention:
Dcmake_install_prefix is the installation directory for Sqlparser library files and header files, where the Lib directory contains the library files Libsqlparser.so,include directories that contain all the header files that you need.
The Dcmake_install_prefix value should not be modified as much as possible after installation depends on this directory.

Make

Make install

(3) Installation Sqladvisor
CD Sqladvisor-2.0/sqladvisor
Cmake-dcmake_build_type=debug./

Make

./sqladvisor-h xx-p xx-u xx-p ' xx '-D xx-q "SQL"-V 1

./sqladvisor-h 192.168.2.244-p 3306-u root-p root-d staryea-q "select * from AMBARI_CPU where hostname = ' Cnn1.sctel. com ' "-V 1

Sqladvisor use (Centos6.8 version)

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.