ActiveBase PerformanceTM Quick TourLearn how ActiveBase PerformanceTM applies the Oracle ‘Hint’ found using ActiveBase SQL ExpertTM on the SQL request without touching applications or databases - resulting in x10-100 response time improvements.
Learn how to block or offload to a replication penalizing analyst reports and developer requests before they knock the database down.
1ActiveBase Ltd. All Rights reserved
Introduction to ActiveBase PerformanceTM
> ActiveBase PerformanceTM acts like an in-line network proxy, intercepting SQL requests before they reach the database, and applying performance rules without touching source-code.
> It improves performance of packaged applications, ad-hoc queries and reporting environments where modifying source-code is not possible.
> ActiveBase SQL ExpertTM automatically creates performance rules that add the Oracle Hint to the SQL requests on their way to the database.
Database Switch
ActiveBase Performance™
Rule Engine OracleDB
Original SQL SQL+Hint / Rewrite
2ActiveBase Ltd. All Rights reserved
Performance Rules overview> ActiveBase Performance includes a powerful rule engine. Each rule is built from a ‘matcher’ (identification criteria) and an ‘action’.
Rule matcher identifies a incoming SQL request in real-time based on: SQL syntax, explain plan patterns, Oracle cost, time of day, no. of partition scans etc.
> When conditions apply, the rule action will apply on the matched SQL.
Actions enable: SQL rewrite, add Oracle ‘Hint’, Block, offload to a replication, delay, ‘search and replace’, rewrite based on PL/SQL function and audit.
3ActiveBase Ltd. All Rights reserved
First usage example: improving application performance> In this customer case we fixed a business transaction running longer than 10
minutes due to an inefficient nested loop between two large tables.
> ActiveBase SQL ExpertTM found an Oracle Hint /*+ USE_HASH(….) */ that
reduces execution time from 10 minutes to 30 seconds
> As source-code cannot be modified, ActiveBase Performance rule applies
the Hint in real-time to the SQL without changing application source-code
> The process is explained in the following slides…
ActiveBase Ltd. All Rights reserved 4
From SQL Expert optimization into performance rule> The SQL Expert has completed
benchmarking all potential ‘Hints’
> Sort the alternative execution statistics
by mouse-clicking the column name: elapse
time, buffer gets or disk reads/writes
> Select the row that includes the best execution statistics and mouse-click on
the ‘Fix SQL’ button
> The ‘Add Rule’ window opens with default matcher ‘SQL Syntax’ and action
‘Add hint’
> Select ‘OK’ and a new performance rule is defined. From now on, when the
application will run the SQL through ActiveBase, the hint will be applied
automatically
ActiveBase Ltd. All Rights reserved 5
Changing ‘SQL Syntax’ rule matcher into ‘execution plan subset’ matcher> When many different reports/ requests
degrade due to the same partial explain plan
use ‘Execution plan subset’ matcher.
> The rule will match and fix many similar
requests with the same problematic partial
explain plan.
> To change the rule Identification click on
the list and choose ‘Explain plan subset’.
ActiveBase Ltd. All Rights reserved 6
> The explain plan of the SQL request appears
> Select the operation section that is fixed by
the Hint , then click ‘Get’
> Now the rule matches
incoming SQL based on partial
explain plan, automatically
adding the Hint
Changing ‘SQL Syntax’ rule matcher into ‘execution plan subset’ matcher
ActiveBase Ltd. All Rights reserved 7
Second usage example: improve application performance
In this customer case we fixed an application that ran a 15 hours long SQL
request with a full-scan on a large table due to an inefficient condition using
month_number
> A rule applies a rewrite to the SQL in real-time which corrects the condition
to use a condition on partitioned ‘date’ column without touching application
source-code
–> Result: 15 hours where reduced into 20 minutes!
> The rewrite rule is explained in the following slide…
ActiveBase Ltd. All Rights reserved 8
SQL rewrite rule> Rule identifies incoming SQL requests with
condition on month_number using regular
expression text matcher (Regex)
> Matched SQL requests have an action ‘Rewrite’
applied, fixing the condition on ‘month_number’
into an equivalent condition on ‘date’ column,
using Regex tag replacements, where \(1) contains
all text before the condition, \(2) contains the
month number and \(3) the text after the condition
ActiveBase Ltd. All Rights reserved 9
Third usage examples: Datawarehouse performanceIn this customer case, reports ran for hours because they did not use
available table partitions, running index range-scan instead for 2 hours and
more, draining server resources
> SQL Experts found an Oracle Hint that reduces time from 2 hours to
10 min by using the partition instead of performing index range scan
> An ActiveBase Performance rule identifies the problematic index range-
scan in real-time, and applies the Oracle Hint
> problem solved on all reports!
ActiveBase Ltd. All Rights reserved 10
ActiveBase explain plan subset rule> Rule identifies partial explain plan steps in incoming application requests in real-time
> Execution plan subset match: 1) Partition range2) table access3) index range scan
> Action ‘Add Hint’ /*+no_index(…) */ applied, forcing Oracle to use the partition key instead
ActiveBase Ltd. All Rights reserved 11
Last usage example: Blocking uncontrolled jobs and penalizing reports and requests
In this customer case, jobs and reports ran forever due to system or
user errors, running full-scan on huge tables, or exceeding 1,000
partition scans
> A rule matches full-scan operations on fact tables that will never end
> An action applies a block in real-time
> request does not degrade database performance and
users immediately receives a clear notification!
ActiveBase Ltd. All Rights reserved 12
ActiveBase block rule
> Rule matches full-scan incoming application requests in real-time
> action ‘Block’ blocks the SQL from reaching the database, returning a message to the user
ActiveBase Ltd. All Rights reserved 13
Clear user-defined message is presented to the user. User clicks [OK] and can continue working without any productivity loss
Block rule denies user full-scan operation on large fact tables
ActiveBase Ltd. All Rights reserved 14
Rule tree explanationRules are built as a tree. ActiveBase rule processing engine applies the rules top-to bottom on every incoming SQL request in real-time .
When a rule is applied on the SQL, you can specify whether to stop rule processing (and send the SQL to the database for execution), or continue down the tree.
A Folder is a means to organize rules according to a common context that is defined in the folder matching criteria
In the example, we have on top the tree a folder, with rules controlling user access and full-scans
We have high-database load folder for rules applied when database is in high-load
ActiveBase Ltd. All Rights reserved 15
Summary
> Installation and configuration in less than a day
> Supports Oracle8.0 to 11g with all application types on all common
platforms (HP, Sun, IBM, Linux and Windows)
> Easy, clear and friendly GUI enables concise one-day training
> Installation and configuration in less than a day
> Provides a configurable ActiveBase listener port (e.g., 1526)
> Scalable and central management for production or non-production
environments with full audit trail and reporting
ActiveBase Ltd. All Rights reserved 16