Transcription

About Quest SQL Optimizer for IBMDB2 z/OSQuest SQL Optimizer for IBM DB2 z/OS ensures optimal SQL performance bygenerating alternatives and testing SQL for maximum application performance.

Optimize SQLSQL Optimizer analyzes your SQL statements and generates alternatives forimproving performance. It can test these alternatives to identify the best SQLstatement for your database environment. Optimizing SQL consists of thefollowing functions:FunctionsDescriptionOptimize SQL SQL Optimizer uses an Artificial Intelligence engine to executeStatementSQL syntax rules that produce semantically equivalent SQLstatement alternatives.Test Run SQL SQL Optimizer executes statement alternatives to view theirAlternativesexecution statistics. This provides execution times foridentifying the best SQL statement for your databaseenvironment. Test Run SQL Alternatives

Select ConnectionNote: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.To select a connection1. Select the SQL Details tab in the main window.2. Click3. Review the following for additional lickto select a previously created connection.Tip: Click to open the Connection Manager to create anew connection. Connect to the DatabaseSelectDescriptionSchema andSQLIDSchemaClickto select a schema for the connection.SQLIDClickto select your SQLID.Related TopicsCreate Optimize SQL SessionsAbout Quest SQL Optimizer for IBM DB2 z/OS

Open Optimizer SQL SessionsConnect to the DatabaseSelect ConnectionTutorial: SQL Optimizer

Connect to the DatabaseNote: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.To create a connection1. Click.2. Review the following for additional iasSelect name of the database to which you want to connect.UserEnter the user name required to connect to the database.PasswordEnter the password associated with the user name. ClickSave password to remember the password.ConnectionDetailsDescriptionCatalog node Displays the local catalog node name.DatabasenameDisplays the local database name or DCS Alias.SubsystemDisplays the name of the subsystem.SystemDisplays system IP address and port number.CommentDisplays comments.InstalledDatabaseClientsDescription

ConnectusingSelect the appropriate database client or clickto browse.3. Click Connect or Close.To display connection information about a z/OS database in Toad.1. Connect to a z/OS DB2 database.2. Open Editor, type: "-DIS DDF" and execute.Note: Consult the IBM DB2 documentation for more information on z/OS DB2databases.Note: If you use a non-administrator windows account to run SQL Optimizer forIBM DB2 z/OS, the login account must belong to the "DB2ADMIN" or"DB2USER" user group. You may also need to add "DB2ADMIN" or"DB2USER" if the user login belongs to the Administrator user group.

SQL Optimization WorkflowThe SQL optimization workflow ensures that your SQL statements performoptimally in your database environment.ProcedureDescriptionOptimize SQL The SQL Optimizer uses artificial intelligence to generateStatementsalternatives with unique execution plans for problematic SQLstatements. SQL Optimizer generates the alternatives byanalyzing SQL statement syntax and database structure.Optimize SQL StatementsTest Run SQL The Test Run SQL function tests the performance of eachalternative SQL Optimizer generates. This provides executiontimes for each alternative to determine the best statement foryour database environment. Test Run SQL AlternativesCompare SQL The Compare feature displays details for two SQL statementsAlternativesside-by-side. You can compare an alternative to the originalSQL statement or compare two alternatives.GenerateReportsThe Report feature creates a SQL resolution report after youcomplete the optimization process.

Create Support BundlesThe Support Bundle provides any easy way for you to contact Quest technicalsupport to report a problem or ask a question. It includes information about eachmodule of the application and your local computer; and can be used to helptroubleshoot problems.To create a support bundle1. Select Help Support Bundle.2. Complete the Contact and Problem Details sections.

Join the SQL Optimizer CommunityThe SQL Optimizer for DB2 z/OS Community is available for you to find thelatest information about SQL Optimizer. By joining the community, you canparticipate in the beta program, communicate with the development team andother users in the discussion forums, and read blog entries. Click Toad for DB2community to join the community or follow the instructions below to access thecommunity from SQL Optimizer.To access the communitySelect the Community tab in the main window.Note: You need a connection to the Internet to access most communitycontent.Related TopicAbout Quest SQL Optimizer for IBM DB2 z/OS

Register SQL OptimizerTo register SQL Optimizer1. Select Help Licensing.2. Review the following for additional information:Authorization Enter the license key for SQL Optimizer.keySite message Enter the site message included with the license key.

Additional ResourcesToad WorldVisit other Toad Communities. Find DBMS and SQL knowledge, find softwaredownloads, and find answers to your database questions. Click here to go toToad World or follow the instructions below.To go to Toad WorldClick Help and select Go to Toad World.

SearchSQL Optimizer allows you to conduct searches in Toad World, Help, andGoogle.To conduct a search1. Enter your search item in the Search field at the top right.2. Select an option from the list.

BTBSCANScan a buffer table.A buffer table construct contains two nodes: a BTBSCAN node and a buffertable node. The buffer table scan is the only way to access a buffer table.

CORSUBUse a correlated subquery for access.The CORSUB operation provides access by a correlated subquery.

DELCURPerform a DELETE WHERE CURRENT OF CURSOR operation.

DELETERemove rows from a table or view.A delete construct contains a DELETE node and one of the following: tablespace scan, single-index access, or multiple-index access.

DFETCHRepresents a direct fetch data using ROWID.ROWID is used as a search condition. This is the most efficient was to access abase table if a ROWID-type column is defined within the table.

DIXSCANRepresents access by XML DOCID index scan.

EXCEPTDenotes the EXCEPT operation.This operation returns rows in the outer table only and eliminates redundantduplicate rows.

EXCEPTADenotes the EXCEPT ALL operation.This operation returns rows in the outer table only and retains redundantduplicate rows.

FETCHRepresents the retrieval of columns for a row.The FETCH operator uses RIDs from an IXSCAN or MIXSCAN.

FFETCHEmploys a fact table index in order to fetch a fact table in a data managerpushdown star join.

FIXSCANRepresents a fact table index scan in a data manager pushdown star join.

HBJOINUse to perform a hybrid join.A hybrid join is used only on inner joins. The construct contains a singleHBJOIN node and two subtrees.

HSSCANUse to perform a HASH SCAN.

INLISTDenotes the in-memory table that stores IN-list elements.

INSERTInsert rows into table or view.The insert construct contains two nodes: one INSERT node and one node thatrepresents either the target view or table.

INTERSECTDenotes the INTERSECT operation.This node returns rows in both the inner and outer tables and eliminatesredundant duplicate rows.

INTERSECTADenotes the INTERSECT ALL operation.This node returns rows in both the inner and outer tables and retains redundantduplicate rows.

IXANDRepresents the intersection of two sorted ROWID lists. Output includes onlyROWIDs in both lists.

IXORReturn the union of two sorted ROWID lists.Output includes any ROWID that is present in at least one ROWID list. Theoutput removes duplicate ROWIDs.

IXSCANUse an index to retrieve the rows.

MERGEMerge multiply data streams into a single data stream.

MERGESTMTDenotes the MERGE statement.This node merges the conditional UPDATE and INSERT operation on a targettable or view into one statement.

MIXSCANScan a multiple-index.

MSJOINUse to perform a merge join.

NLJOINUse to perform a nested loop join.This join is used to join tables and is represented by a NLJOIN node and rightand left subtrees. The inner table is represented by the right subtree and the outertable by the left subtree. Use either a single-index scan, a multiple-index scan, ora table space scan to access both the inner and outer tables. You can also includeanother join operation with the left subtree.

PARTITIONSeparate a single data stream into multiple data streams.

PIXSCANScan Dynamic Pair-Wise Index.

PRUNEDNo access path is generated for the query since the query only qualifies zerorows.

QBAuxiliary node that represents a subquery in a particular SQL statement.A subquery can be any of the following operations:MERGEINSERTSELECTUPDATEDELETESELECT with FOR UPDATE OFUPDATE WHERE CURRENT OF CURSORDELETE WHERE CURRENT OF CURSORTRUNCATETable expressionCorrelated subselect or full selectNon-correlated subselect or fullselectEXCEPTEXCEPT ALLEXCEPTEXCEPT ALLUNIONUNION ALLNotes:The query block node is the root of a subtree and represents the wholesubquery.QBn denotes a query block node,where n represents the query block

number.

RETURNAuxiliary node that represents an entire SQL statement.Labeled QUERY, this node can represent any of the following operations:MERGEINSERTSELECTUPDATEDELETE

REPARTITIONRe-partition multiple input data streams for multiple output data.

RGLISTUse to perform a range-list Scan.

RIDFETCHUse built-in RID function for access.

SELUPDDenotes value SELECT with FOR UPDATE OF.

SEMIJOINUse to perform a semi join.During a hybrid join, this node denotes a join operation where the outer tablerecords merge with one of the indexes on the inner table.

SIXSCANAccess and scan with a sparse index.A sparse index scan construct contains two nodes: a SIXSCAN node and asparse index node labeled SPARSE INDEX.

SORTSort result set in the order specified from the join process or the query.

SORTRIDDenotes operation where DB2 sorts qualified index entries.

STARJOINUse to perform a star join.Star join allows you to join a dimension column of a fact table to the key columnin the corresponding dimension table.

TBSCANUse to read every row in a table.A table space scan construct consists of two nodes: a TBSCAN node and sometype of table node such as a base table, a materialized query table, a work file, apipe, or a table function.

TRUNCATEDenotes TRUNCATE statement.A TRUNCATE statement deletes all rows for either declared global temporarytables or base tables.

UNIONCombine rows from multiple tables and remove duplicate rows.A UNION construct contains a UNION node and at least one subtree. Eachsubtree contains a WFSCAN node, a WORKFILE node, a SORT node, and thesource query block node.

UNIONACombine rows from multiple tables and retain duplicate rows.An UNION ALL construct contains a UNIONA node and at least one subtree.Subtrees denote any source query blocks.

UPDATEModify rows in a table.An update construct contains one UPDATE node and one of the following:single-index access, multiple-index access construct, or table space scan.

UPDCURRepresents UPDATE WHERE CURRENT OF CURSOR value.

WFSCANScan a work file.A work file scan construct contains a WFSCAN node plus a work file node thatis labeled WORKFILE.

WORKFILEDenotes a work file or temporary table that DB2 generates.DB2 labels a work file node with the word WORKFILE or with specific name.Sort (for JOIN, UNION, DISTINCT, GROUP BY, or ORDER BY operations) isthe most common operation for generating work files.

XIXANDDenotes operation where DB2 returns intersection of two sorted DOCID lists.Output includes only DOCIDs in both lists.

XIXORDenotes operation for XML data where DB2 returns the union of two sortedDOCID lists.The output includes any DOCID that exists in at least one of the DOCID listsand removes duplicate DOCIDs.

XIXSCANAccess and scan an XML index.This operation returns DOCID and NODWID pairs.

About Optimizing SQLThe Optimize SQL function analyzes the input SQL statement and uses anArtificial Intelligence Engine to produce a group of semantically equivalentversions of the statement, known as SQL alternatives. You can then test run thesealternatives in the SQL Optimizer window to determine the best-performingversion of the SQL.Note: The Intelligence Level setting you select affects the duration of theoptimization process and the number of alternatives SQL Optimizer generates.

Create Optimize SQL SessionsNote: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.To create a new session1. Select the SQL Details tab in the main window.2. Click.To add a sessionClickbesides the Session tab.Note: You need to create a new connection for each new SQL Optimizer session.Related TopicsAbout Quest SQL Optimizer for IBM DB2 z/OSOpen Optimizer SQL SessionsConnect to the DatabaseSelect ConnectionTutorial: SQL Optimizer

Open Optimizer SQL SessionsNote: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.To open a session1. Select the SQL Details tab in the main window.2. Click.3. Select a Optimize session to open.Related TopicsCreate Optimize SQL SessionsAbout Quest SQL Optimizer for IBM DB2 z/OSOpen Optimizer SQL SessionsConnect to the DatabaseSelect ConnectionTutorial: SQL Optimizer

Optimize SQL StatementsSQL Optimizer generates semantically equivalent alternatives with uniqueexecution plans for your original SQL statement. You can then test run thealternatives to benchmark their performance. SQL Optimizer provides executiontimes and run-time statistics for each alternative to help you identify the bestSQL statement for your database environment.Note: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.To optimize a SQL statement1. Select the SQL Details tab in the main window.2. Enter a SQL statement in the Alternative Details pane of the SQL Detailstab.3. Clickto optimizer the SQL statement.4. Select a connection to use. Review the following for additional lickto select a previously created connection.Tip: Click to open the Connection Manager to create anew connection. Connect to the DatabaseSelectDescriptionSchema andSQLIDSchemaClickto select a schema for the connection.SQLIDClickto select your SQLID.

5. When SQL Optimizer is finished generating alternatives, use one of thefollowing methods to test run the SQL alternatives:To test run all SQL alternatives, click.To test run a single SQL alternative, select the alternative and click.To test run two or more alternatives simultaneously, select thealternatives, click the arrow beside- Selected.and select Test RunThe execution statistics display in the Alternatives pane once the testrun completes. Select an alternative to see more information in theAlternative Details and Execution Plan panes.Test Run SQL AlternativesTips:Clickto stop the test run process.You can select an executing SQL statement and clickselected statement.to abort only theTo clear the SQL Rewrite windowTo clear only the results and retain the original SQL statement, right-click withinthe Alternative Details pane and select Clear Optimization Results KeepOriginal Scenario.To clear the SQL Rewrite window, right-click within the Alternative Detailspane and select Clear Optimization Results Clear Original Scenario.

Related TopicsAutomatically Optimize SQL StatementsTest Run SQL Alternatives

Specify Session Test Run CriteriaUse the Session Test Run Criteria dialog to specify options to use for the currenttest run of SQL statements in the Optimize SQL module. The options youspecify are used for the current test run only. Global test run options forOptimize SQL are modified at Options Optimize SQL Test Run.

Execution Method and Run TimeSelect from the following options:ExecutionMethodDescriptionMaximumrows to beretrieved(records)Select this checkbox and then enter the maximum number ofrows to retrieve for a test run of all records.Run TimeRetrievalMethodDescriptionRun SQLoptionsSelect one of the following options:Run all SQL twice if original SQL runs faster than(seconds)—Combines the Original SQL twice and allothers once and the All SQL twice options into oneoption and allows you to determine (by the number ofseconds a SQL statement runs) which option to use. Theoriginal SQL statement always runs twice. The SQLalternatives run twice if the original SQL statement runs inless time than the value specified. Otherwise, the SQLalternatives all run once.Original SQL twice and all others once—Caches datafrom a table into memory the first time you access it. Thenext time you access that data, it is already in memory sothe following SQL statements run faster. To provide anaccurate comparison, the first SQL statement runs twicebut only the time from the second run is compared to thetimes for the other statements.All SQL twice—Executes all SQL statements twice to

eliminate factors that can affect the accuracy of theresults. If you recently executed a SQL statement, theinformation for that statement may be cached and thestatement may execute faster. This option eliminates timevariation caused by caching since it runs all SQLstatements twice but only uses the second run time forcomparison.All SQL once—Executes all SQL statements once. Forlong running SQL, you do not need to run any statementtwice since the effect from caching diminishes over time.

Order and TerminationSelect from the following options:ExecutionOrderDescriptionExecutionSelect one of the following options:order for SQLIntelligent order—Executes representative SQL statementswith various plan cost according to SQL Optimizer'sintelligence engine.Plan cost—Executes SQL statements in order of plan ect one of the following options:execution ofSQLRun time of fastest SQL—Cancels SQL statements thatalternative if itrun longer than the current fastest run time. With thisruns longeroption, the first SQL statement runs and the time from thatthanstatement is used as the termination time for the next SQLstatement. When a SQL statement runs faster than thistime, the faster time is used as the new termination time.This percentage of the original SQL run time—CancelsSQL statements whose total elapsed time is the specified% of the total elapsed time for the original SQL statement.It terminates all SQL statements that run longer than thecalculated termination time.User defined time (mins/secs)—Cancels SQL statementsthat run longer than a time you specify.Run without termination—Runs all SQL statements to

completion regardless of run time.Cancellationdelay(seconds)Adds a specified time to the termination time. It isimportant to factor a delay into the overall terminationtime to account for the time needed to send the SQLstatement to the database server.

SQL to ExecuteExecuteCriteriaDescriptionExecute allalternativeswith criteriaSelect one of the following:% of alternatives with lowest cost—Enter the percentageof SQL alternatives to execute with the lowest cost. Youcan also enter the minimum and maximum number ofalternatives to execute.Number of alternatives with lowest cost—Enter thenumber of SQL alternatives to execute with the lowestcost.All alternatives with cost less than or equal to originalSQL—Select to execute all SQL alternatives with a costless than or equal to the cost of the original SQLstatement.All alternatives with cost less than the average of allalternatives—Select to execute all SQL alternatives with acost less than the average cost of all alternatives.All alternatives with cost less than the original SQL bypercentage—Enter a percentage used to determine theSQL alternatives selected for execution. Optimize SQLexecutes alternatives with a cost that is the specifiedpercentage lower than the cost of the original statement.All alternatives with cost less than the original SQL by Ntimes—Enter a value for N used to determine the SQLalternatives selected for execution. Optimize SQLexecutes alternatives with a cost N times lower than the

original SQL statement.All alternatives—Select to execute all SQL alternatives.Tips:Clickto stop the test run process.You can select an executing SQL statement and clickselected statement.Related TopicsAbout Quest SQL Optimizer for IBM DB2 z/OSOpen Optimizer SQL SessionsExecution Method OptionsOrder and Termination Optionsto abort only the

Automatically Optimize SQL StatementsUse the Auto Optimize function to perform the optimization and testingprocesses simultaneously. The function optimizes your original SQL statementby generating alternatives and starts testing once SQL Optimizer generates thefirst alternative. The Auto Optimize function reduces the time required to findthe best alternative by not waiting until SQL Optimizer generates all alternativesbefore starting the testing process. You can stop the Auto Optimize functiononce you find a satisfactory SQL statement alternative.Note: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.To automatically optimize a SQL statement1. Select the SQL Details tab in the main window.2. Enter a SQL statement in the Alternative Details pane.3. Click.Tip: Clickto stop the optimization and testing processes.Related TopicsAbout Quest SQL Optimizer for IBM DB2 z/OSOptimize SQL Statements

About Execution PlansThe execution plan displays the steps a database takes to execute a SQLstatement. You can use the execution plan to determine if a statement is efficient.Each step of the tree indicates how SQL Optimizer retrieves rows of data. Thefirst line of the execution plan displays the SQL statement type, such asSELECT. The remaining lines represent an operation. The operations arenumbered in the order of execution to make the plan easier to read.The database executes each child operation before the parent operation. Forsome SQL statements, the database executes the parent operation once itretrieves a single row from the child operation. Other SQL statements requirethat the database retrieve all rows from the child operation before it executes theparent operation.

Execution Plan WindowThe Execution Plan pane shows types of information for the original SQL or theSQL associated with the currently selected alternative.

Execution Plan ActionsRight-click in the Execution Plan window to select from the following actions:ActionDescriptionCopyCopies the execution plan to the clipboard.SaveSaves the execution plan as a JPG file.PrintOpens the print window so you can print the executionplan.StyleSelect option to display different plan details (operators,predicates, statistics).View PlanAllows you to change how the execution plan is displayed.Step DescriptionSelect this option to display a description of the stepselected in the execution plan.Animate PlanStepsHighlights, one-by-one, the execution plan steps.Plan OptionsOpens the Execution Plan Options window so you canselect which information is displayed in the execution planand whether to display specific items in a column.Help on RETURN Displays the help text for the currently selected operation inthe execution plan.Help on Execution Opens online help for the Execution Plan window.PlanRelated TopicsAnimate Execution PlansCopy Execution PlansFill Missing Execution Plans

Get Execution Plans

Review Execution PlansThe execution plan can be displayed in different ways to help you get moredetailed information.To change how the execution plan is displayed1. Right-click the plan and select View Plan.2. Select one of the following display options:As Tree PlanAs Plain Language PlanAs Graphic PlanAs MS Graphic PlanTips:You can change the colors used to highlight different items for the currentplan only by right-clicking the plan and selecting Plan Options. You canchange colors for all execution plans in Options General ExecutionPlan. Execution Plan OptionsYou can use the toolbar to the right of the Execution Plan pane to changethe details displayed.

Related TopicsAbout Execution PlansAnimate Execution PlansCopy Execution Plans

Get Execution PlansNote: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.SQL Optimizer automatically retrieves the execution plan when you optimize ortest run a SQL statement.To get the execution plan1. Select the Optimize SQL tab.2. Enter a SQL statement in the Alternative Details pane.3. Click.Related TopicsAbout Execution PlansAnimate Execution PlansCopy Execution Plans

Fill Missing Execution PlansNote: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.To fill a missing execution plan1. Select the Optimize SQL tab.2. Enter a SQL statement in the Alternative Details pane.3. Click the arrow besideRelated TopicsAbout Execution PlansGet Execution Plansand select Fill Missing Plans.

Copy Execution PlansTo copy an execution planRight-click the execution plan and select Copy.Note: You can paste execution plans displayed as a Tree Plan or PlainLanguage Plan in text or bitmap format. Applications such as MicrosoftWord allow you to choose the format using the Paste Special option. Youcan use text applications such as Notepad to paste execution plans in textformat or graphic applications such as MS Paint to paste execution plans inbitmap format.Related TopicsAbout Execution PlansFill Missing Execution PlansGet Execution Plans

Animate Execution PlansYou can animate each step in the execution plan in the order SQL Optimizerexecutes them.To animate the execution plan or cancel the animationRight-click the execution plan and select Animate Plan Steps.Related TopicsAbout Execution PlansCopy Execution PlansFill Missing Execution PlansGet Execution Plans

About Generating Index AlternativesSQL Optimizer analyzes the following in your original SQL statement and tablereferences to generate index alternatives:SQL statement syntaxRelated tables and indexesSearch argumentsTable join conditionsOnce SQL Optimizer generates alternatives, you can test them to evaluateimprovements in database performance.Note: SQL Optimizer does not physically create indexes on your database whengenerating alternatives.Related TopicsTest Run Index AlternativesGenerate Index Alternatives

Test Run Index AlternativesAfter SQL Optimizer generates index alternatives, you can test each alternative.When (Undefined variable: CommonVariables.product name) tests indexes, theindexes are physically created on the database and dropped after SQL Optimizerexecutes the statement. When you test run index alternatives, you must select astorage group in which to store the created indexes.(missing or bad snippet)To execute index alternatives1. (missing or bad snippet)2. Select a SQL Rewrite session.3. Select an index set in the Alternatives pane.4. Click.Tip: Clickto test run all index alternatives.5. Select a storage group in which to store the created indexes. (missing or badsnippet)IndexDescriptionInformationIndexShows SQL text of index selected.Storage group to store indexes created.Note: Once you select the storage group for the first index,Storage group (Undefined variable: CommonVariables.product name)automatically selects the same storage group for theremaining indexes.Note: Review the information in the DDL Script pane.

Related TopicAbout Generating Index AlternativesGenerate Index Alternatives

Generate Index AlternativesThis topic focuses on information that may be unfamiliar to you. It does notinclude all step and field descriptions.To generate index alternatives for a SQL statement1. Select the SQL Details tab in the main window.2. Enter the SQL statement in the Alternative Details pane.3. Click Index button.Note: Delete Remaining Indexes Window may appear if it has been detectedthat some virtual/real indexes exist in the database and these might affect indexsearching result. It is recommended to remove the unused indexes before startingthe search.1. Select Index Details in the SQL Information pane to view index generationinformation.Tip: Clickto stop the index generation process.Note: When you generate virtual index alternatives, the execution plan is notretrieved for the SQL statement because SQL Optimizer does not physicallycreate indexes on the database. Fill Missing Execution PlansRelated TopicsAbout Generating Index AlternativesDelete Remaining IndexesTest Run Index Alternatives

Test Run SQL AlternativesNote: This topic focuses on information that may be unfamiliar to you. It doesnot include all step and field descriptions.Use SQL Optimizer to perform test runs on alternatives in order to view theirrun-time statistics. You can test run a single statement, selected statements, or allstatements. Use the Test Run Single SQL function to retrieve run-time statisticsfor a single statement.Use the Test Run function to perform multiple test runs on selected or allstatements. These functions allow you to get run-time statistics for selected SQLor average run-time statistics for all SQL.Note: SQL Optimizer automatically rolls back any changes made to the databaseif the SQL is an INSERT, UPDATE, DELETE, or MERGE statement. Thismaintains the integrity of your data and provides that

Quest SQL Optimizer for IBM DB2 z/OS ensures optimal SQL performance by generating alternatives and testing SQL for maximum application performance. Optimize SQL SQL Optimizer analyzes your SQL statements and generates alternatives for improving performance