Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use sqld360 for specific SQL tuning

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to use sqld360 for specific SQL tuning, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Sqld360 is an open source data collection software that can collect data for a specific SQL statement and provide further analysis and processing without installing any components.

1. Download and install the software

Sqld360 is a completely open source software that can be downloaded from the official website https://github.com/mauropagano/sqld360. The download media is a separate zip file.

Upload it to the server and extract it.

[root@localhost ~] # cd /

[root@localhost /] # mkdir sql360d

[root@localhost /] # cd sql360d/

[root@localhost sql360d] # ls-l

Total 188

-rw-r--r--. 1 root root 189858 Jun 17 14:13 sqld360-master.zip

Use unzip to extract and then change permissions.

[root@localhost sql360d] # unzip sqld360-master.zip

Archive: sqld360-master.zip

9c19c022a6439ed729335d156a2a332eb129c5a1

Creating: sqld360-master/

Inflating: sqld360-master/README.txt

Creating: sqld360-master/js/

Inflating: sqld360-master/js/SQLd360_img.jpg

(for reasons of space, there are omissions. )

Inflating: sqld360-master/sql/sqld360_9h_one_org_chart.sql

Inflating: sqld360-master/sqld360.sql

[root@localhost sql360d] #

[root@localhost sql360d] # cd..

[root@localhost /] # chown-R oracle:oinstall sql360d/

[root@localhost /] # ls-l | grep sql360d/

[root@localhost /] # ls-l | grep sql360d

Drwxr-xr-x. 3 oracle oinstall 4096 Jun 17 14:13 sql360d

2. Execute script to generate report package

Go to the sqld360 folder and execute the sqlplus script.

[oracle@localhost ~] $cd / sql360d/sqld360-master

[oracle@localhost sqld360-master] $ls-l

Total 48

Drwxr-xr-x. 2 oracle oinstall 4096 Jun 8 09:14 js

-rwxr-xr-x. 1 oracle oinstall 28942 Jun 8 09:14 license.txt

-rw-r--r--. 1 oracle oinstall 2223 Jun 8 09:14 README.txt

Drwxr-xr-x. 2 oracle oinstall 4096 Jun 8 09:14 sql

-rw-r--r--. 1 oracle oinstall 3361 Jun 8 09:14 sqld360.sql

If you need to analyze a sql statement, you first need to find the sql_id tag in the v$sqlarea or AWR report, and then use this ID as the tag to generate the report.

[oracle@localhost sqld360-master] $sqlplus / nolog

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 17 14:21:27 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.

SQL > conn / as sysdba

Connected.

SQL > @ sqld360.sql 41hkr3jy35zn6 T

(several outputs)

6579 06-17-2015 14:25 00287_sqld360_sicsdb_41hkr3jy35zn6_5_sql_monitor_reports_sqlmon.zip

38246 06-17-2015 14:25 00288_sqld360_sicsdb_41hkr3jy35zn6_5_tcb_testcase_tcb.zip

22621 06-17-2015 14:25 00289_sqld360_sicsdb_41hkr3jy35zn6_5_raw_data.html

87420 06-17-2015 14:25 00290_sqld360_sicsdb_41hkr3jy35zn6_5_raw_data.txt

75786 06-17-2015 14:25 00291_sqld360_sicsdb_41hkr3jy35zn6_5_raw_data.csv

10240 06-17-2015 14:25 00292_sqld360_sicsdb_41hkr3jy35zn6_5_eadam_ash.tar

7096 06-17-2015 14:25 99999_sqld360_41hkr3jy35zn6_drivers.zip

1244946 06-17-2015 14:25 00005_sqld360_sicsdb_41hkr3jy35zn6_alert_sicsdb.log

2519140 06-17-2015 14:25 00003_sqld360_sicsdb_41hkr3jy35zn6_tkprof_sort.txt

13906-17-2015 14:25 00000_readme_first.txt

--

27165029 296 files

In the directory, a compressed package file is generated.

[oracle@localhost sqld360-master] $ls-l

Total 1420

Drwxr-xr-x. 2 oracle oinstall 4096 Jun 8 09:14 js

-rwxr-xr-x. 1 oracle oinstall 28942 Jun 8 09:14 license.txt

-rw-r--r--. 1 oracle oinstall 2223 Jun 8 09:14 README.txt

Drwxr-xr-x. 2 oracle oinstall 4096 Jun 8 09:14 sql

-rw-r--r--. 1 oracle oinstall 1402369 Jun 17 14:25 sqld360_sicsdb_41hkr3jy35zn6_localhost_20150617_1424.zip

-rw-r--r--. 1 oracle oinstall 3361 Jun 8 09:14 sqld360.sql

3. The result shows that

After pressurization, you will find that it is a package composed of a series of html, txt and cvs files. From the readme.txt, you can find the initial file.

1. Unzip sqld360_sicsdb_41hkr3jy35zn6_localhost_20150617_1424.zip into a directory

2. Review 00001_sqld360_sicsdb_41hkr3jy35zn6_index.html

Open the index.html file and you can find all the analysis projects.

From the above project, you can find the analysis dimension of the sqld360 to the SQL statement:

ü database configuration and SQL statement information

Implementation plan and process statistics, including time history information

U object statistics, based on CBO optimizer basis

ü SQL performance information

Various other component tools

The following screenshots are based on several major functional modules:

Database information:

SQL subcursor execution plan:

Itemized statistics of the implementation plan:

Data history statistics information:

Thank you for reading this article carefully. I hope the article "how to use sqld360 for specific SQL tuning" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report