14
1 iveBase Ltd. All Rights reserved Welcome to ActiveBase SQL Expert™ Quick Tour. In the next few slides we will walk you through the features of SQL Expert. You will appreciate how easy it is to find Hints that will improve the execution time of your SQL statements by sometimes 100’s%. No SQL expertise needed, All interactive, no programming, Powerful execution options for quick results Installed & operational in less than 10 min.

Expert Quick Tour

Embed Size (px)

Citation preview

Page 1: Expert Quick Tour

1ActiveBase Ltd. All Rights reserved

Welcome to ActiveBase SQL Expert™ Quick Tour.In the next few slides we will walk you through the features of SQL Expert.

You will appreciate how easy it is to find Hints that will improve the execution time of your SQL statements by sometimes 100’s%.

No SQL expertise needed, All interactive, no programming, Powerful execution options for quick

results Installed & operational in less than 10 min.

Page 2: Expert Quick Tour

ActiveBase SQL ExpertTM is a powerful SQL improvement tool to help find the best Oracle ‘Hint’ for ‘Select’ SQL statements.

ActiveBase SQL ExpertTM runs on a Windows client, connecting to Oracle databases. Through simple screens you will easily be able to:

1. Identify long-running or resource-intensive SQL statements with potential performance issues

2. Analyze manually entered or previously identified ‘Select’ SQL requests for every possible execution plan

3. Run serially alternatives (SQL + Oracle ‘Hints’) against the Oracle database in order to obtain the most efficient Hint

4. View detailed execution statistics

General overviewActiveBase SQL Expert™ SQL improvement made easy TM

ActiveBase Ltd. All Rights reserved 2

Page 3: Expert Quick Tour

ActiveBase Ltd. All Rights reserved

Process Actions

1. Feed SQL request for improvement

Add manually a SQL request or select it from Oracle SGA using ‘Hotspot’ panel.

2. Analyze possible Alternatives

Let ActiveBase SQL Expert™ generate alternatives using ‘Hints’ that generate unique execution plans. Set analyzer level (depth of joins and object access options).

3. Set benchmark options Select the alternatives you want to benchmark and define alternative execution order.Set parameters for total execution time, automatic cancelling, session and parallel degree settings.

4. Run benchmark Let ActiveBase SQL Expert™ run each alternative against the database. Easily manage alternative executions in real-time through our colored panel.

5. Analyze results Detailed benchmark audit and execution summary table allows to quickly select the Hint that produces the best improvement.

Find ‘best Hint’ in 5 StepsActiveBase SQL Expert™ SQL improvement made easy TM

3

Page 4: Expert Quick Tour

Defining database connection

Define database parameters for connecting to the database. ActiveBase SQL ExpertTM opens a jdbc connection to analyze and run serially (benchmark) the different execution alternatives.

Note: to analyze different statements, DBA user name requires the following privileges:

ActiveBase Ltd. All Rights reserved 4

grant select any table to user_name

grant select any dictionary to user_name

grant alter session to user_name

grant resumable to user_name

grant become user to user_name

ActiveBase SQL Expert™ SQL improvement made easy TM

Page 5: Expert Quick Tour

ActiveBase Ltd. All Rights reserved 5

Click Find Hotspots to copy and paste a ‘Select’ request from Oracle SGA.

Then click on the Find Alternatives button.

Step 1: Enter SQL request to improve

ActiveBase SQL Expert™ SQL improvement made easy TM

Copy and paste your long running ‘Select’ SQL request into the text area

Page 6: Expert Quick Tour

ActiveBase Ltd. All Rights reserved 6

Click on Options to set the benchmark execution parameters

Click on ‘ ’ to view execution plan for a given Hint

Add Alternative enables to manually add an alternative

Analyzer level defines the number of hint combinations investigated on the SQL statement

Alter Session enables to manually change benchmark session parameters

Step 2: Analyze possible Alternatives

ActiveBase SQL Expert™ SQL improvement made easy TM

Page 7: Expert Quick Tour

Step 3: Define Benchmark Execution Parameters

> Run original first> Execute each alternative several times for

benchmarking short requests (elapse<1 sec.)> Limit total benchmark time (hours)> Set parallel query degree for requests that run

in parallel mode (e.g., disable parallel or wait for minimum number of PX servers before running each alternative)

> Set automatic execution canceling option for stopping alternatives that run more than X% the original time or best time.

ActiveBase Ltd. All Rights reserved 7

ActiveBase SQL ExpertTM provides a set of parameters for efficientexecution when finding the best Hint in the benchmark process.

ActiveBase SQL Expert™ SQL improvement made easy TM

Page 8: Expert Quick Tour

ActiveBase Ltd. All Rights reserved 8

For a 40 min. report with 1,000 alternatives, an automatic cancelling 50% of ‘best’ is set.

This means that the Execution of an Alternative will be stopped if it exceeds 50% of the time found for the current ‘best’ alternative.

At first, the original 40 min. is the best, so automatically cancelling will stop alternatives running more than 20 min.

When an alternative runs less than 20 min, it will become the ‘best’, so cancellation will occur for other Alternatives running more than 10 min. and so on… This allows to quickly benchmark all alternatives for the best ‘Hint’

ActiveBase SQL Expert™ SQL improvement made easy TM

Example of Automatic Cancelling Option

50

Step 3: Define Benchmark Execution Parameters

Page 9: Expert Quick Tour

ActiveBase Ltd. All Rights reserved 9

• Automatic cancelled alternatives are colored in red.• Completed executed alternatives are colored in green.• The best time alternative is colored in blue.

Step 4: Run Benchmark ActiveBase SQL Expert™ SQL improvement made easy TM

Click on Select all to mark alternatives for execution.

Click on the Cost column for sorting execution order based on increasing Oracle cost value.

Click Run to start the benchmark, which executes the checked alternatives in the order previously set.

For requests with bind values click on Set bind to enter typical bind values.

• Original executed and appears first in the panel

Page 10: Expert Quick Tour

ActiveBase Ltd. All Rights reserved 10

It is useful for identifying the improved execution plan change (applied by the ‘Hint’) and to assess if it can improve other similar cases.

If the improvement can be achieved in many other similar requests, evaluate ActiveBase Performance™ capability to add the ‘Hint’ automatically to all similar requests WITHOUT TOUCHING SOURCE CODE OR DATABASE!!

• Choose the ‘Hint’ to compare. • Click on Compare for comparing execution plans of different SQL ‘Hint’ alternatives.

Step 5: Analysis ActiveBase SQL Expert™ SQL improvement made easy TM

Compare Execution Plan of Alternatives

Page 11: Expert Quick Tour

Find Best Hint in the Benchmark Results Audit Trail

ActiveBase Ltd. All Rights reserved 11

For the original and each alternative,the audit includes:1. SQL text including the Oracle

‘Hint’ 2. Full SQL execution statistics3. Statement Execution plan

Open the [installation directory] \ActiveBase Expert\log directoryView the Expert audit file: expert-[date/time].out

The file includes detailed session statistics of the benchmark, in the order of execution.

ActiveBase SQL Expert™ SQL improvement made easy TM

Step 5: Analysis

Page 12: Expert Quick Tour

Get best ‘Hint’

ActiveBase Ltd. All Rights reserved 12

For more detailed information, please refer to our user manual found in start->programs->ActiveBase Expert->user manual

A pop-up window is presented. Copy the ‘Hint’ text and paste it to the beginning of your original SQL text.

ActiveBase SQL Expert™ SQL improvement made easy TM

To get the best‘Hint’, go to the 'Best alternative' line colored in blue and double click on the 'Hint' column.

Step 5: Analysis

Page 13: Expert Quick Tour

1. ActiveBase SQL ExpertTM is a powerful and easy-to-use tool for helping DBAs and SQL developers improve execution of SQL statements by finding the best ‘Hint’ based on the actual state of their Oracle database.

2. Supporting Oracle8 – 11g, optimization is based on each version’s optimization capabilities.

3. It saves time by automatically analyzing and benchmarking alternatives, using a complete set of execution parameters to quickly identify the best alternative - getting the most out of your existing indexes and database CBO.

4. Improvements are logged for off-line analysis

ActiveBase Ltd. All Rights reserved 13

ActiveBase SQL Expert™ SQL improvement made easy TM

Summary

Page 14: Expert Quick Tour

> Now that you know how to use ActiveBase SQL Expert™ for improving your long running SQL statements, what can you do next?

ActiveBase offers several products to help you be even more efficient and productive:

– ActiveBase Tuning Robot™, a server version of ActiveBase SQL Expert™, for automatically identifying the SQL statements that need to be improved and finding their ‘Best Hint’.

– ActiveBase Performance™, an inline-proxy installed between applications and the Oracle database. It intercepts SQL requests on their way to the database in real-time, identifies the ones for which a ‘Best Hint’ has been found, automatically appends this Hint to the SQL and sends it to Oracle for optimized execution.

ActiveBase Ltd. All Rights reserved 14

What next ? ActiveBase SQL Expert™ SQL improvement made easy TM