
Copyright © 2001, 2015, Oracle and/or its affiliates. All rights reserved.
temporarily enable SQL logging in Oracle Transportation Management and review the logs for
repetitive SQL statements.
Once a poorly performing SQL statement is identified, an Explain Plan should be performed. Within
Oracle Transportation Management this can be performed in SQL Servlet by pre-pending the SQL
statement with “explain plan for”. Performing an explain plan outside of Oracle Transportation
Management will supply more information about the query. When running it outside Oracle
Transportation Management, it is important to execute the stored procedure call (vpd.set_user())
before running the query. Otherwise the explain plan will not be evaluated with VPD applied as it
would be when run within the context of Oracle Transportation Management.
Determining the Origin of a SQL Statement
SQL statements that are part of Oracle Transportation Management originate from Oracle
Transportation Management base code, custom saved queries, and reports. The performance tuning of
custom reports and saved queries are the responsibility of the customer. Saved queries provide a
mechanism to create a query which can be used in various parts of Oracle Transportation Management
including Finders (Search pages), Business Monitors, and Automation Agents. The following query can
be used to search for a SQL statement which may be generated from a saved query:
select saved_query_gid from saved_query where sql_find_all like
‘%querytext%’or sql_check one like ‘%querytext %’
The ‘querytext’ should be just part of the SQL statement, since the SQL statement is slightly modified
depending on where in Oracle Transportation Management the SQL statement is being used. For
instance, the Business Monitor prefixes all SQL statements with “select count(*)…”.
Using Timeouts with SQL Statements
To avoid performance delays associated with long-running SQL statements, Oracle Transportation
Management supports optional timeouts for SQL queries, updates and stored procedure calls. These
timeouts can be varied by use case.
The following properties control SQL timeouts:
glog.sql.query.timeout.<query use case>=<# of seconds>
glog.sql.update.timeout.<update use case>=<# of seconds>
glog.sql.call.timeout.<procedure use case>=<# of seconds>
If set to 0, the statement will never time out.
The following table summarizes valid uses cases by statement type:
Finders,
Managers,Business
monitors
Agent conditions, IF agent
action
All other query statements
Comentarios a estos manuales