Sqlflatten
Using Discoverer 10g, is there a way to remove the numbers generated as table and column aliases in SQL Inspector? I've already used the sqlflatten setting in the registry with little effect.
Hi Nirbhaya,
One thing that I would like to point out is that Discoverer does not always
give the exact sql that it executes in the background.
It tries to flatten the sql to make reading it easier.
I couple of things to look at:
1. What is your database optimizer mode. Discoverer only uses cost based
optimizer. So if your database is rule based then execution plan is different for
discoverer and sqlplus. Make sure your tables are analyzed.
2. I seen this a couple of times that customer has very bad performing
LOVs. When you run the report Discoverer builds the LOV and could take
up most of the processing time. In this case you can either optimize the
LOV query or build separate LOV tables that will retrieve your LOV record
quickly.
3. Check the explain plan in the Discoverer and compare that to the explain
plan in sqlplus.
4. Do a session level trace on your discoverer connection.
One thing to look out for is that discoverer desktop makes 2 database
connections. You need to find the correct database session to trace.
Regards
Roelie Viviersf
Similar Messages
-
Oracle 10g Discoverer Reports & export to xls fails for large reports
Hi ,
We have following configurations:
1: RHEL 5.4
2: Discoverer :Version 10.1.2.48.18
3: Oracle10g Apps Version : Version 10.1.2.0.2
Issue:
Most of small reports works fine ....but when large discoverer reports are executed the page
keeps on refreshing for 15-20 hours but no output ....same for export to xls ......
But same reports works fine in oracle9i for same data voulme....
Observations:
When on linux with top command the processes are monitored its observed that discoverer process
dis51ws dies for large reports after 1-2 minutes ...& the page keeps on refreshing but no output....
for 1-2 minutes it consumes 50-80% cpu utilisation then process disappears & cpu 80% idle ...
It seems that as 10g Apps is installed on RHEL 5.4 ...non certfified OS causing an issue...
Can any one adds more inputs in this regards......
we have checked logs : below are log details :
Below logs gives "Logkeys: exceptions discoiv.servlet_exceptions" for this report ...
1:
OC4J~OC4J_BI_Forms~default_island~1:
10/04/11 12:11:29 Oracle Application Server Containers for J2EE 10g (10.1.2.0.2) initialized
10/04/11 12:11:59 Using oracle.reports.util.EnvironmentGlobal class
10/04/11 14:23:37 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:23:38 Discoverer Model - 10.1.2.48.18
Session ID:2010041114240115278
10/04/11 14:25:42 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:25:42 Discoverer Model - 10.1.2.48.18
Session ID:2010041114254315439
10/04/11 14:28:53 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:28:54 Discoverer Model - 10.1.2.48.18
Session ID:2010041114285615691
10/04/11 14:29:13 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:29:13 Discoverer Model - 10.1.2.48.18
Session ID:2010041114291315728
10/04/11 14:32:35 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:32:35 Discoverer Model - 10.1.2.48.18
Session ID:2010041114323615949
10/04/11 14:32:48 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:32:48 Discoverer Model - 10.1.2.48.18
Session ID:2010041114324815982
10/04/11 14:34:44 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:34:44 Discoverer Model - 10.1.2.48.18
Session ID:2010041114344616128
10/04/11 14:34:55 Logkeys: exceptions discoiv.servlet_exceptions
10/04/11 14:34:55 Discoverer Model - 10.1.2.48.18
Session ID:2010041114345516155
10/04/11 14:36:25 Tutalii: /oracle10gas/app/oracle10g/discoverer/lib/discoverer5.jar archive
2:
Discoverer~SessionServer~12
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Active Eul: EULADMIN
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Calling GetData on Preference Repository
Calling GetData on Preference Repository
DCSCORBAInterface::Delete called
DCSCORBAInterface destructor called
DCSCORBAInterface::Delete called
DCSCORBAInterface destructor called
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
ASSERT [email protected]:436
3:
application.log
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Finding async request action forward
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Calling externalize
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.viewer.model.WorksheetModel.getStateString EXT_TOOL: dvtb xk-1ml versionzw1.0w kyxdvtbyxbisltyxbicho vzwwjyxjbisltyxjdvtby
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.viewer.model.WorksheetModel.getStateString EXT_VIEW: dv xk-1ml versionzw1.0w kyxdv bazw0w cszw25wyxpc vzw1wjyxjdvy
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.viewer.model.WorksheetModel.getStateString EXT_VIEW: lc
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.viewer.model.WorksheetModel.getStateString EXT_HS: dvhs
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.viewer.model.WorksheetModel.getStateString EXT_DS: dv_ds &qls_z!2=New GL Report.Clndr Id&arq=false&qls_x!14=Sheet 1.Closing Balance (Credit)&qls_x!3=New GL Report.Voucher No&qls_z!3=New GL Report.Frm Prd&fm=xml&qls_z!4=New GL Report.To Prd&qls_x!2=New GL Report.Prd Desc&qls_x!11=Sheet 1.Debit Amount&qls_x!4=New GL Report.Gl Voucher No&qls_x!9=Sheet 1.Opening Balance Debit&tss_s!0=New GL Report.Acct Id,lh,group,false&qls_x!1=New GL Report.Acct Sdesc&qls_z!1=New GL Report.Loc Desc&qls_x!10=Sheet 1.Opening Balance (Credit)&qls_x!12=Sheet 1.Credit Amount&aow=false&qls_x!7=New GL Report.Shrt Code&qls_x!13=Sheet 1.Closing Balance (Debit)&qls_x!6=New GL Report.Pmt Rct Dt&qls_x!8=New GL Report.Dtl Nrtn&sss=true&qls_x!5=New GL Report.Voucher Dt&qls_x!0=New GL Report.Acct Id&qls_z!0=New GL Report.Loc Id&ddsver=1
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.viewer.model.ViewerModelImpl.externalize [EXTERN_STATE]: $wksht$%24dv_ds%24%26qls_z%212%3DNew+GL+Report.Clndr+Id%26arq%3Dfalse%26qls_x%2114%3DSheet+1.Closing+Balance+%28Credit%29%26qls_x%213%3DNew+GL+Report.Voucher+No%26qls_z%213%3DNew+GL+Report.Frm+Prd%26fm%3Dxml%26qls_z%214%3DNew+GL+Report.To+Prd%26qls_x%212%3DNew+GL+Report.Prd+Desc%26qls_x%2111%3DSheet+1.Debit+Amount%26qls_x%214%3DNew+GL+Report.Gl+Voucher+No%26qls_x%219%3DSheet+1.Opening+Balance+Debit%26tss_s%210%3DNew+GL+Report.Acct+Id%2Clh%2Cgroup%2Cfalse%26qls_x%211%3DNew+GL+Report.Acct+Sdesc%26qls_z%211%3DNew+GL+Report.Loc+Desc%26qls_x%2110%3DSheet+1.Opening+Balance+%28Credit%29%26qls_x%2112%3DSheet+1.Credit+Amount%26aow%3Dfalse%26qls_x%217%3DNew+GL+Report.Shrt+Code%26qls_x%2113%3DSheet+1.Closing+Balance+%28Debit%29%26qls_x%216%3DNew+GL+Report.Pmt+Rct+Dt%26qls_x%218%3DNew+GL+Report.Dtl+Nrtn%26sss%3Dtrue%26qls_x%215%3DNew+GL+Report.Voucher+Dt%26qls_x%210%3DNew+GL+Report.Acct+Id%26qls_z%210%3DNew+GL+Report.Loc+Id%26ddsver%3D1%24dv%24xk-1ml+versionzw1.0w+kyxdv+bazw0w+cszw25wyxpc+vzw1wjyxjdvy%24wd%24false%24lc%24%24dvtb%24xk-1ml+versionzw1.0w+kyxdvtbyxbisltyxbicho+vzwwjyxjbisltyxjdvtby%24wvs%241101%24dvhs%24$cn$&vct=svd&cnk=cf_a101$ap$%26df%3D%26l%3D%26s%3D%26nc%3D%26dl%3D$expl$&sp=&node=&event=focus&state=(117)&root=63&wbt=2$prid$NEW_GL_REPORT%2F31$ctyp$viewer
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Storing state
10/04/11 14:37:25 discoverer: [INFO] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Externalize Perf: 8ms
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Saving Attributes
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Saving ApplicationRequest
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Checking for SSO mode
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Saving errors, messages
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Returning final forward: "/ExportProgress.uix" redirect: "false"
10/04/11 14:37:25 discoverer: [TRACE] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute ----------------------- End Request --------------------------
10/04/11 14:37:25 discoverer: [INFO] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.framework.ApplicationController.execute Total Request Time in AppCtrl: 18
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] org.apache.struts.action.RequestProcessor.processForwardConfig processForwardConfig(ForwardConfig[name=long running operation,path=/ExportProgress.uix,redirect=false,contextRelative=false])
10/04/11 14:37:25 discoverer: [DEBUG] [AJPRequestHandler-ApplicationServerThread-17] oracle.discoverer.applications.viewer.view.DiscovererPageBroker.isCacheable Setting cacheable to: true
4: XML log:
log2010041114285615691.xml
<MSG_GROUP>DCS</MSG_GROUP> <PROCESS_ID>15691</PROCESS_ID> <FILE_NAME>dcstim.cpp</FILE_NAME> <LINE_NUMBER>184</LINE_NUMBER> <THREAD_ID>-1283799360</THREAD_ID> <LOG_TIME>Sun Apr 11 14:29:13 2010
</LOG_TIME> ]]>
</SUPPL_DETAIL> </PAYLOAD> </MESSAGE>
<MESSAGE><HEADER><TSTZ_ORIGINATING>2010-04-11T14:29:13+00:00</TSTZ_ORIGINATING> <COMPONENT_ID>DISCOVER</COMPONENT_ID> <MSG_TYPE TYPE="NOTIFICATION"></MSG_TYPE><MSG_LEVEL>4</MSG_LEVEL> <HOST_ID>2010041114285615691</HOST_ID> <MODULE_ID>DCS</MODULE_ID> </HEADER> <PAYLOAD><MSG_TEXT><![CDATA[Timer started.]]></MSG_TEXT> <SUPPL_DETAIL><![CDATA[
<MSG_GROUP>DCS</MSG_GROUP> <PROCESS_ID>15691</PROCESS_ID> <FILE_NAME>dcstim.cpp</FILE_NAME> <LINE_NUMBER>162</LINE_NUMBER> <THREAD_ID>-1283799360</THREAD_ID> <LOG_TIME>Sun Apr 11 14:29:13 2010
</LOG_TIME> ]]>
</SUPPL_DETAIL> </PAYLOAD> </MESSAGE>
<MESSAGE><HEADER><TSTZ_ORIGINATING>2010-04-11T14:29:13+00:00</TSTZ_ORIGINATING> <COMPONENT_ID>DISCOVER</COMPONENT_ID> <MSG_TYPE TYPE="TRACE"></MSG_TYPE><MSG_LEVEL>5</MSG_LEVEL> <HOST_ID>2010041114285615691</HOST_ID> <MODULE_ID>DCS</MODULE_ID> </HEADER> <PAYLOAD><MSG_TEXT><![CDATA[Return DCSModelInterface::SendReceiveData(kScheduleInterface, inTable, outTable)
outTable = DCITable
Length=0
]]></MSG_TEXT> <SUPPL_DETAIL><![CDATA[
<MSG_GROUP>DCS</MSG_GROUP> <PROCESS_ID>15691</PROCESS_ID> <FILE_NAME>dcsmdli.cpp</FILE_NAME> <LINE_NUMBER>259</LINE_NUMBER> <THREAD_ID>-1283799360</THREAD_ID> <LOG_TIME>Sun Apr 11 14:29:13 2010
</LOG_TIME> ]]>
</SUPPL_DETAIL> </PAYLOAD> </MESSAGE>
<MESSAGE><HEADER><TSTZ_ORIGINATING>2010-04-11T14:29:13+00:00</TSTZ_ORIGINATING> <COMPONENT_ID>DISCOVER</COMPONENT_ID> <MSG_TYPE TYPE="NOTIFICATION"></MSG_TYPE><MSG_LEVEL>4</MSG_LEVEL> <HOST_ID>2010041114285615691</HOST_ID> <MODULE_ID>DCS</MODULE_ID> </HEADER> <PAYLOAD><MSG_TEXT><![CDATA[DCSModelInterface::SendReceiveData(kScheduleInterface)]]></MSG_TEXT> <SUPPL_DETAIL><![CDATA[
<MSG_GROUP>DCS </MSG_GROUP> <PROCESS_ID>15691</PROCESS_ID> <FILE_NAME>dcsmdli.cpp</FILE_NAME> <LINE_NUMBER>226</LINE_NUMBER> <THREAD_ID>-1283799360</THREAD_ID> <LOG_TIME>Sun Apr 11 14:29:13 2010
</LOG_TIME> <LOG_SIZE>0</LOG_SIZE> <EXTRA_INFO><MethodEnd duration="0.1" sizeChange="0" >
real 0m0.1s
user 0m0.900s
sys 0m0.109s
</MethodEnd></EXTRA_INFO> ]]>
</SUPPL_DETAIL> </PAYLOAD> </MESSAGE>
<MESSAGE><HEADER><TSTZ_ORIGINATING>2010-04-11T14:37:13+00:00</TSTZ_ORIGINATING> <COMPONENT_ID>DISCOVER</COMPONENT_ID> <MSG_TYPE TYPE="NOTIFICATION"></MSG_TYPE><MSG_LEVEL>4</MSG_LEVEL> <HOST_ID>2010041114285615691</HOST_ID> <MODULE_ID>DCS</MODULE_ID> </HEADER> <PAYLOAD><MSG_TEXT><![CDATA[Timer stopped.]]></MSG_TEXT> <SUPPL_DETAIL><![CDATA[
<MSG_GROUP>DCS</MSG_GROUP> <PROCESS_ID>15691</PROCESS_ID> <FILE_NAME>dcstim.cpp</FILE_NAME> <LINE_NUMBER>184</LINE_NUMBER> <THREAD_ID>-1283799360</THREAD_ID> <LOG_TIME>Sun Apr 11 14:37:13 2010
</LOG_TIME> ]]>
</SUPPL_DETAIL> </PAYLOAD> </MESSAGE>
<MESSAGE><HEADER><TSTZ_ORIGINATING>2010-04-11T14:37:13+00:00</TSTZ_ORIGINATING> <COMPONENT_ID>DISCOVER</COMPONENT_ID> <MSG_TYPE TYPE="NOTIFICATION"></MSG_TYPE><MSG_LEVEL>4</MSG_LEVEL> <HOST_ID>2010041114285615691</HOST_ID> <MODULE_ID>DCS</MODULE_ID> </HEADER> <PAYLOAD><MSG_TEXT><![CDATA[Timer started.]]></MSG_TEXT> <SUPPL_DETAIL><![CDATA[
<MSG_GROUP>DCS</MSG_GROUP> <PROCESS_ID>15691</PROCESS_ID> <FILE_NAME>dcstim.cpp</FILE_NAME> <LINE_NUMBER>162</LINE_NUMBER> <THREAD_ID>-1283799360</THREAD_ID> <LOG_TIME>Sun Apr 11 14:37:13 2010
</LOG_TIME> ]]>
</SUPPL_DETAIL> </PAYLOAD> </MESSAGE>
Regards,Hi ,
as per Note: 466697.1 ....its an memory error....& need to increase MaxVirtualDiskMem and MaxVirtualHeapMem
But we already have slowly increased MaxVirtualDiskMem and MaxVirtualHeapMem to below very high values ...but the issue remains same.......
as per note we are getting Logkeys: exceptions discoiv.servlet_exceptions error but
after that we are not getting below error ............
Unexpected error in state machine: java.lang.OutOfMemoryError
Hence I presume that its different issue rather than memmory....
Below are pref.txt values..........
CacheFlushPercentage = 25 # Percent of cache flushed if the cache is full. valid values 0 - 100%.
MaxVirtualDiskMem = 9294967296 # Maximum amount of disk memory allowed for the data cache. Should be greater than or equal to MaxVirtualHeapMem
MaxVirtualHeapMem = 4294967296 # Maximum amount of heap memory allowed for the data cache.
QueryBehavior = 0 # Action to take after opening a workbook (0 = Run Query Automatically, 1 = Don't Run Query, 2 = Ask for Confirmation)
Also we have raised an SR & as per SR .............all below settings are tried as per SR except for applying a recent patch....
====================================================================
Discoverer performance is largely determined by how well the database
has been designed and tuned for queries.
A well-designed database will perform significantly better than a poorly
designed database.
Workbook design can also affect query performance.
1. Apply latest Discoverer patch as documented in <<Note:237607.1>>
'ALERT: Required and Recommended Patch Levels For All Discoverer Version'.
2. Increase the maximum JVM heap memory:
In general, the default values for the minimum heap (-Xms) memory and
maximum heap (-Xmx) memory are sufficient.
However, if your organization consistently runs large Discoverer queries
then you may benefit from increasing the maximum heap memory from the
default values.
This is recomended if your users are typically running large queries via
Discoverer Viewer.
Increasing the JVM memory can help to avoid "java.lang.OutOfMemoryError"
in Discoverer Viewer:
Please see <<Note 563960.1>>, Best Practice: Configuring The
OC4J_BI_Forms JVM For
Discoverer Viewer/Portlet 10g Performance And Stability for specific
details.
3. Disable Query Prediction:
Query Prediction provides an estimate of the time required to retrieve
the information in a query.
The Query Prediction appears before the query and consumes time.
Edit the <oracle_home>/discoverer/util/pref.txt on the middle-tier
server and set:
QPPEnable=0
Also set:
QPPObtainCostMethod = 0
4. Uncheck the 'Enable fantrap detection' checkbox.
When the box is checked, every query generated by Discoverer is
interrogated. Discoverer will detect a fan trap and rewrite the query to
ensure that the aggregation is done at the correct level.
Please refer to <<Note:210553.1>>, Oracle BI Discoverer: Fan Trap
Resolution - Correct Results
Everytime for more information on fantraps.
To disable, in Plus go to Tools -> Options -> Advanced -> Fan Trap
settings.
In Viewer go to Preferences and uncheck the box.
5. Disable Materialized Views/Summaries
In pref.txt add parameter:
MaterializedViewRedirectionBehavior = 0
Value equal to 0 ensures that Materialized View (MV) Redirection is
always performed when MVs are available.
6. Improve query performance by optimizing the SQL.
In pref.txt modify/add following parameters:
SQLFlatten = 0
SQLItemTrim = 0
SQLJoinTrim = 0
UseOptimizerHints = 0
If value of SQLFlatten is 1 then Discoverer will merge inline views in
the query SQL where ever possible.
In case of SQLItemTrim, Discoverer will remove unused folder items from
the query SQL where possible and for SQLJoinTrim Discoverer will remove
unnecessary joins from the query where possible.
UseOptimizerHints will add Optimizer hints to SQL if set >
0.Unnecessarily making Discoverer perform these checks consumes
resources and rather than increasing the performance may reduce the same. So unless you feel these checks have to be performed depending on
requirements, assign zero to these parameters.
7. When Discoverer builds a query, Discoverer makes a database security
check to confirm that the user has access to the tables referenced in
the folders. Avoiding this check can save time.
So in pref.txt underDatabase section add:
ObjectsAlwaysAccessible = 1
8. Whenever you are creating conditions, ensure that you match the Case.
This in turn can reduce the time Discoverer spends on changing the Case
and matching.
For example:
option Upper(Department) in (Upper('VIDEO SALES')
9. Ensure that summaries are refreshed periodically in Discoverer
Administrator.
10. Increase the amount of memory available for the Discoverer data cache. Please refer to <<Note 245752.1>>, Explaining Oracle BI Discoverer
Session Memory Management
And Server Cache Settings.
11. Performance may be enhanced by enabling OracleAS Web Cache.
==================================================================
Thanks for your reply....................
Regards,
Maybe you are looking for
-
MacPro double mapping network drive
Hi, I have two network drives (ordinary external HDDs connected to my Mac Mini Server) that my MacPro maps during startup. Since a few days it maps one of the volumes twice. I allready checked the network connections, reset SMC and P-RAM, repair perm
-
Touchpad is triggering everything
I have tried adjusting sensitivity thru both the windows control panel mouse and the boot camp track pad tab all to no avail. I am very frustrated I just bought this machine and I cannot use windows without accidentally triggering programs, right cli
-
Strong colour shift when reselecting Adobe Standard camera profile
I'm having this curious problem with Nikon V1 NEFs (raw files) in Lightroom 4 beta. In the develop module, Adobe Standard is selected as the default camera profile. If I switch to one of the other profiles (for the V1, the options are Camera Landscap
-
Sbdadm create-lu results in sbdadm: data file error
Hello, I am trying to create a new thin-provisioning LUN by issueing the following: sbdadm --disk-size 100M /export/data.lun This yields this error message: sbdadm: data file error I have tried that on two other Solaris Express 11 installations and I
-
How to open an .exe file in flash using AS3.0?
hi all Iam trying to open an notepad.exe file, when I click a button in flash file. I tryed navigateToURL methoad, it is getting but it is showing some alert with " save - run - cancel " options, when I click run it will open the notepad. But