Query on SI_UPDATE_TS issues
I'm trying to do a wildcard search on SI_UPDATE_TS, but a query using wildcards returns no results. On fields like SI_CREATION_TIME, I can perform a query such as:
SI_CREATION_TIME = '2007.11.%'
and it will return all objects for November. For SI_UPDATE_TS, I have to use a combination or greater than and less than. Does anyone know of any way to use the wildcard?
As an aside, if I do this query:
select si_id, si_update_ts, si_creation_time from ci_infoobjects where SI_UPDATE_TS BETWEEN '2007.11.1.00.00.00' and '2007.11.30.00.00.00'
my CMS restarts!
Anyone have any thoughts on this?
+2 for suggesting a CMS trace.
>> I'm assuming you're not opening 2000 reports here.
That's exactly what I'm doing, actually. 2000 Desktop Intelligence reports are being queried for via iinfostore.query("select top 2000 ...") - and upon doing so, result in an updated SI_UPDATE_TS as of the time the object was queried.
This is actually happening with both Desktop Intelligence and Web Intelligence report types. In fact, it may even be happening with Universe files as well. Someone else seemed to have encountered this at : http://www.forumtopics.com/busobj/viewtopic.php?t=167314 . I will pursue a trace and see what comes of it.
Thanks for the insights -
Atul
Similar Messages
-
Content Tracker Reports Query file modification issue - Custom Report
Hi All,
I was trying to generate a custom report using Content Tracker. I was successful in doing so. However, I found that sometimes it does not pick up the updated query file of Content Tracker reports.
I made a change in my query:
from SELECT * FROM Users to
SELECT dname FROM Users
the change is written on the file but when i generated the report from C.T. UI, it's still showing me the old results having all the columns. Tried bouncing the server as well, but no use.
I also added a new query 24 hrs back (as SELECT count(*) As UsersNum FROM Users), it's still not recognizing it and giving error as Failure of server APACHE bridge: No backend server available for
connection: timed out after 10 seconds or idempotent set to OFF;
and the log says,
Unable to execute service SCT_GET_DOCUMENT_INFO_ADMIN and function sctExecuteQuery.
Unable to create the result set for query '(null)'. SQL statement to execute cannot be empty or null
What could be the resolution of this issue?
I am using UCM 11g + SSXA.Server bounce.
Issue is not file update but some other issue, ongoing in another thread by Me. -
SQL query, IF ELSE issue - Help.
I am trying to migrate data from one table to another, however I am having problems trying to figure out a small issue in my Query.
I'm using Oracle 11g, SQL Developer 3.0
here is my old table
CREATE TABLE PROD.RELATED_OFFENDERS
CREATED_DATETIME DATE ,
LAST_UPD_DATETIME DATE ,
LAST_UPD_ID VARCHAR2 (30 BYTE) ,
CREATOR_ID VARCHAR2 (30 BYTE) ,
USSC_ID NUMBER (10) ,
REL_ORG_ID NUMBER (10) NOT NULL ,
REL_ORG_NAME VARCHAR2 (100 BYTE) ,
REL_IND_NAMES VARCHAR2 (100 BYTE) ,
REL_DOCKET_NUM VARCHAR2 (7 BYTE) ,
REL_LEVEL_AUTH NUMBER (2) ,
REL_LEVEL_AUTH_TEXT VARCHAR2 (240 BYTE) ,
SENT_TYPE_CODE NUMBER (2) ,
INDICATOR VARCHAR2 (1 BYTE)
ALTER TABLE PROD.RELATED_OFFENDERS
ADD CONSTRAINT RO_PK PRIMARY KEY ( REL_ORG_ID ) ;New table
CREATE TABLE USSC_CASES.CORP_RELATED_OFFENDERS
REL_ORG_ID NUMBER (10) NOT NULL ,
SENT_ID NUMBER (12) NOT NULL ,
DEF_TYPE_CODE NUMBER (1) ,
DEF_TYPE_NAME VARCHAR2 (100 BYTE) ,
REL_DOCKET_NUM VARCHAR2 (7 BYTE) ,
REL_LVL_AUTH NUMBER (1) ,
REL_LVL_AUTH_TEXT VARCHAR2 (240 BYTE)
ALTER TABLE USSC_CASES.CORP_RELATED_OFFENDERS
ADD CONSTRAINT CORP_REL_OFF_PK PRIMARY KEY ( REL_ORG_ID ) ;In the old table you will notice i have the following attributes:
REL_ORG_NAME VARCHAR2 (100 BYTE) ,
REL_IND_NAMES VARCHAR2 (100 BYTE) ,
In my new table I have both columns as one called DEF_TYPE_NAME VARCHAR2 (100 BYTE).
what I'm trying to do is use the INDICATOR column VALUE (old table) for each row and say the following in SQL code:
(if INDICATOR = 'I' then DEF_TYPE_NAME = the value of REL IND_NAMES
else if INDICATOR = 'O' then DEF_TYPE_NAME = the value of REL_ORG_NAME) AS DEF_TYPE_NAME
here is my query
INSERT INTO USSC_CASES.CORP_RELATED_OFFENDERS
SELECT
RO.REL_ORG_ID AS REL_ORG_ID,
S.SENT_ID AS SENT_ID,
DECODE(RO.INDICATOR, UPPER(TRIM('I')), 1, 2) AS DEF_TYPE_CODE,
AS DEF_TYPE_NAME, -- here is where I'm having issues.
RO.REL_DOCKET_NUM AS REL_DOCKET_NUM,
RO.REL_LVL_AUTH AS REL_LVL_AUTH,
RO.REL_LVL_AUTH_TEXT AS REL_LVL_AUTH_TEXT
FROM PROD.RELATED_OFFENDERS RO,
PROD.SENTENCES S
WHERE RO.USSC_ID = S.CORPSENT_USSC_ID
AND RO.SENT_TYPE_CODE = S.SENT_TYPE_CODE
AND RO.SENT_TYPE_CODE = 1
ORDER BY REL_ORG_ID;Thanks in advance for your help.INSERT INTO USSC_CASES.CORP_RELATED_OFFENDERS
SELECT RO.REL_ORG_ID AS REL_ORG_ID,
S.SENT_ID AS SENT_ID,
CASE RO.INDICATOR
WHEN 'I' THEN REL_IND_NAMES
WHEN 'O' THEN REL_ORG_NAME
END AS DEF_TYPE_NAME,
RO.REL_DOCKET_NUM AS REL_DOCKET_NUM,
RO.REL_LVL_AUTH AS REL_LVL_AUTH,
RO.REL_LVL_AUTH_TEXT AS REL_LVL_AUTH_TEXT
FROM PROD.RELATED_OFFENDERS RO,
PROD.SENTENCES S
WHERE RO.USSC_ID = S.CORPSENT_USSC_ID
AND RO.SENT_TYPE_CODE = S.SENT_TYPE_CODE
AND RO.SENT_TYPE_CODE = 1
ORDER BY REL_ORG_ID;SY. -
UNX issue : Failed to initialize Query Panel (service issue?)
Hello all,
For a couple off days now we are trying to use universe(s) in Desing studio with no luck.
We use the Efashion single source relational universe on which we can run Webi's without a problem . When we add a datasource in DS we see and can select the unx but when we push the "edit query specification" button DS freezes and return the error : Failed to initialize Query Panel
We just upgrade tot DS1.2 SP01 both on server side as on client side.
This is the error from the error log : which seems to have a connection problem to a certain service:
Any of you have an idea how to proceed?
All servers run fine when we check the CMC and an APS is added for Design studio (analysis) .DS works fine with BEX queries...
Thanks in advance.
!ENTRY com.sap.ip.bi.zen.ui 4 0 2014-03-14 12:43:33.876
!MESSAGE Failed to initialize Query Panel
!STACK 0
com.businessobjects.dsl.services.workspace.impl.WorkspaceException: Unable to find servers in CMS vyouboxd01.you.com:6400 and cluster @vyouboxd01.you.com:6400 with kind connectionserver and service CS_CORBA_NetworkLayer. All such servers could be down or disabled by the administrator. (FWM 01014)
at com.businessobjects.dsl.services.dataprovider.impl.AbstractDataProviderWithUniverse.createDataSource(AbstractDataProviderWithUniverse.java:437)
at com.businessobjects.dsl.services.dataprovider.impl.QuerySpecDataProvider.createInitialDataSource(QuerySpecDataProvider.java:609)
at com.businessobjects.dsl.services.dataprovider.impl.QuerySpecDataProvider.finalizeCreation(QuerySpecDataProvider.java:852)
at com.businessobjects.dsl.services.workspace.impl.AbstractBuiltInDataProviderBuilder.buildDataProvider(AbstractBuiltInDataProviderBuilder.java:36)
at com.businessobjects.dsl.services.dataprovider.impl.DataProviderFactory.createDataProviderWithUniverse(DataProviderFactory.java:190)
at com.businessobjects.dsl.services.dataprovider.impl.DataProviderFactory.createAndAddDataProvider(DataProviderFactory.java:108)
at com.businessobjects.dsl.services.workspace.impl.WorkspaceServiceImpl.addDataProvider(WorkspaceServiceImpl.java:83)
at com.businessobjects.dsl.services.workspace.impl.WorkspaceServiceImpl.addDataProvider(WorkspaceServiceImpl.java:45)
at com.sap.ip.bi.zen.backends.bip.ui.dialogs.QueryPanelDialog.createQueryPanelContext(QueryPanelDialog.java:133)
at com.sap.ip.bi.zen.backends.bip.ui.dialogs.QueryPanelDialog.createDialogArea(QueryPanelDialog.java:97)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:775)
at com.sap.ip.bi.zen.ui.internal.dialogs.ZenTrayDialog.createContents(ZenTrayDialog.java:63)
at org.eclipse.jface.window.Window.create(Window.java:432)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1104)
at com.sap.ip.bi.zen.ui.internal.dialogs.ZenTrayDialog.open(ZenTrayDialog.java:110)
at com.sap.ip.bi.zen.ui.internal.dialogs.datasource.DataSourceDialogController.editDataSourceClickedInternal(DataSourceDialogController.java:158)
at com.sap.ip.bi.zen.ui.internal.dialogs.datasource.DataSourceDialogController$1.run(DataSourceDialogController.java:147)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at com.sap.ip.bi.zen.ui.internal.dialogs.datasource.DataSourceDialogController.editDataSourceClicked(DataSourceDialogController.java:144)
at com.sap.ip.bi.zen.ui.internal.dialogs.datasource.DataSourceSelectionPane.editQueryButtonClicked(DataSourceSelectionPane.java:253)
at com.sap.ip.bi.zen.ui.internal.dialogs.datasource.DataSourceSelectionPane$6.widgetSelected(DataSourceSelectionPane.java:233)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:826)
at org.eclipse.jface.window.Window.open(Window.java:802)
at com.sap.ip.bi.zen.ui.internal.dialogs.ZenTrayDialog.open(ZenTrayDialog.java:112)
at com.sap.ip.bi.zen.ui.internal.commands.AddDataSourceHandler.execute(AddDataSourceHandler.java:24)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:499)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:850)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:743)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:727)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:662)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at com.sap.ip.bi.zen.ui.internal.application.ZenApplication.start(ZenApplication.java:36)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
Caused by: com.businessobjects.mds.services.solver.ConnectionSolverException: Unable to find servers in CMS vyouboxd01.you.com:6400 and cluster @vyouboxd01.you.com:6400 with kind connectionserver and service CS_CORBA_NetworkLayer. All such servers could be down or disabled by the administrator. (FWM 01014)
at com.businessobjects.mds.services.solver.AbstractConnectionSolver.addCredentialInfo(AbstractConnectionSolver.java:238)
at com.businessobjects.mds.services.solver.AbstractConnectionSolver.solve(AbstractConnectionSolver.java:136)
at com.businessobjects.mds.services.solver.AbstractConnectionSolver.solveRelational(AbstractConnectionSolver.java:151)
at com.businessobjects.mds.services.solver.AbstractConnectionSolver.solveRelational(AbstractConnectionSolver.java:147)
at com.businessobjects.mds.services.solver.AbstractConnectionSolver.solveRelational(AbstractConnectionSolver.java:143)
at com.businessobjects.mds.services.helpers.DataFoundationHelper.getConnection(DataFoundationHelper.java:892)
at com.businessobjects.mds.services.helpers.DataFoundationHelper.isErpDataFoundation(DataFoundationHelper.java:2896)
at com.businessobjects.mds.services.helpers.UniverseHelper.isErpUniverse(UniverseHelper.java:1554)
at com.businessobjects.dsl.services.datasource.DataSourceFactory.createQueryCapability(DataSourceFactory.java:286)
at com.businessobjects.dsl.services.datasource.DataSourceFactory.fillQueryCapability(DataSourceFactory.java:959)
at com.businessobjects.dsl.services.datasource.DataSourceFactory.getDataSource(DataSourceFactory.java:839)
at com.businessobjects.dsl.services.dataprovider.impl.AbstractDataProviderWithUniverse.createDataSourceFromUniverse(AbstractDataProviderWithUniverse.java:572)
at com.businessobjects.dsl.services.dataprovider.impl.AbstractDataProviderWithUniverse.retrieveDataSource(AbstractDataProviderWithUniverse.java:542)
at com.businessobjects.dsl.services.dataprovider.impl.AbstractDataProviderWithUniverse.buildDataSource(AbstractDataProviderWithUniverse.java:448)
at com.businessobjects.dsl.services.dataprovider.impl.AbstractDataProviderWithUniverse.createDataSource(AbstractDataProviderWithUniverse.java:432)
... 72 more
Caused by: com.sap.connectivity.cs.core.CSError: Unable to find servers in CMS vyouboxd01.you.com:6400 and cluster @vyouboxd01.you.com:6400 with kind connectionserver and service CS_CORBA_NetworkLayer. All such servers could be down or disabled by the administrator. (FWM 01014)
at com.sap.connectivity.cs.remoting.corba.proxy.ConnectionManager.<init>(ConnectionManager.java:81)
at com.sap.connectivity.cs.remoting.corba.proxy.ConnectionServer.getConnectionManager(ConnectionServer.java:125)
at com.sap.connectivity.cs.core.Environment.CreateConnectionManager(Environment.java:530)
at com.sap.connectivity.cs.core.Environment.CreateConnectionManager(Environment.java:504)
at com.sap.connectivity.cs.api.trace.EnvironmentLogger.CreateConnectionManager(EnvironmentLogger.java:368)
at com.businessobjects.mds.services.relational.CsService.getAuthenticationMode(CsService.java:180)
at com.businessobjects.mds.services.relational.CsService.addCredentialInfo(CsService.java:485)
at com.businessobjects.mds.services.solver.AbstractConnectionSolver.addCredentialInfo(AbstractConnectionSolver.java:235)
... 86 more
Caused by: com.crystaldecisions.sdk.exception.SDKException$OCAFramework: Unable to find servers in CMS vyouboxd01.you.com:6400 and cluster @vyouboxd01.you.com:6400 with kind connectionserver and service CS_CORBA_NetworkLayer. All such servers could be down or disabled by the administrator. (FWM 01014)
cause:com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException$AllServicesDown: Unable to find servers in CMS vyouboxd01.you.com:6400 and cluster @vyouboxd01.you.com:6400 with kind connectionserver and service CS_CORBA_NetworkLayer. All such servers could be down or disabled by the administrator. (FWM 01014)
detail:Unable to find servers in CMS vyouboxd01.you.com:6400 and cluster @vyouboxd01.you.com:6400 with kind connectionserver and service CS_CORBA_NetworkLayer. All such servers could be down or disabled by the administrator. (FWM 01014)
at com.crystaldecisions.sdk.exception.SDKException.map(SDKException.java:140)
at com.sap.connectivity.cs.remoting.bip.SvcFactoryBase.getManagedService(SvcFactoryBase.java:183)
at com.sap.connectivity.cs.remoting.bip.SvcFactoryBase.getManagedService(SvcFactoryBase.java:128)
at com.sap.connectivity.cs.remoting.corba.svchelpers.NetworkLayerSvcFactory.getServiceFromCriteria(NetworkLayerSvcFactory.java:53)
at com.sap.connectivity.cs.remoting.corba.svchelpers.NetworkLayerLookup.getServiceFromCriteria(NetworkLayerLookup.java:114)
at com.sap.connectivity.cs.remoting.corba.svchelpers.NetworkLayerLookup.getService(NetworkLayerLookup.java:83)
at com.sap.connectivity.cs.remoting.corba.proxy.ConnectionManager.<init>(ConnectionManager.java:68)
... 93 more
Caused by: com.crystaldecisions.enterprise.ocaframework.OCAFrameworkException$AllServicesDown: Unable to find servers in CMS vyouboxd01.you.com:6400 and cluster @vyouboxd01.you.com:6400 with kind connectionserver and service CS_CORBA_NetworkLayer. All such servers could be down or disabled by the administrator. (FWM 01014)
at com.crystaldecisions.enterprise.ocaframework.ServerController.redirectServer(ServerController.java:664)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.redirectServer(ServiceMgr.java:959)
at com.crystaldecisions.enterprise.ocaframework.ManagedSession.redirectServer(ManagedSession.java:338)
at com.crystaldecisions.enterprise.ocaframework.ManagedSession.get(ManagedSession.java:247)
at com.crystaldecisions.enterprise.ocaframework.ManagedSessions.get(ManagedSessions.java:299)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody4(ServiceMgr.java:520)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService_aroundBody5$advice(ServiceMgr.java:512)
at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(ServiceMgr.java:1)
at com.sap.connectivity.cs.remoting.bip.SvcFactoryBase.getManagedService(SvcFactoryBase.java:164)
... 98 moreHi Bram,
I had a look in your Java-Exception and there a connectionserver is missing.
I know that there are two kind of connection servers 32 and 64 Bit. Do one of your APS Servers have connectivity and connectivity 32 Bit ???
I had an issue when i first wanted to use a .unx connection with DS with my splitted APS.
I had one APS only containing the Analysis service. To get to run my .unx access i had to add the Adaptive connectivity Service to the APS containing the analysis service.
On top of that i had to add the DSL Bridge (otherwise my adaptive connectivity Service did not start)
Perhabs this helps you out.
Good luck
Manfred -
Query Variable Transport Issue/Question
Hi, i am transporting some queries into my BWQ Quality System and ended up with an error:
Element 1Q070GEFFJXNCR690H6TJ4M13 is missing in version M
The queries work fine in BWD Development.
I checked the following in table RSZGLOBV
BWD Development System and there is Version A, B, and D
BWQ Development System and there is only Version D
BWP Development System and there is only Version D
So the variable already exists in all of the system and the VARUNID is the same in all of the systems as well..
Any ideas why I would have this issue and will there be a problem with queries already using this variable in BWQ and BWP should I transport it again to resolve this issue. (If this would resolve the issue)
Thanks!Hi,
I faced the same issue many times and did the same what Andrey suggested.
In your case the query element does not exist in QA and PRD in Active Version 'A', which means none of your queries in those environments are using the variable already.
We get the description of various statuses when we do an F1 in the field version after running table RSZGLOBV. I could not understand much of the explanation given. It says when an object is saved, the version would be M and when it is activated it would be A. We save queries/elements....but activation??
Regards,
Murali.
Edited by: Murali Krishna K on Mar 7, 2011 11:07 PM -
We have a legacy Forms and Reports application(~750 items combined). I suspect the applications were developed initially under 6i, but they work quite well under 10GR2, and is testing well under 11GR2 (which we plan on migrating to soon). We ran into an issue the other day for Data Query Blocks, and wanted your expert opinion on it.
Due to a change in business requirements, we recently had to increase the length of a database field (from 20 to 30). We went into Forms Developer, made the appropriate changes, and recompiled them all successfully. Everything *seems* to work fine, but we noticed we get failures on any item that tries to utilize that extra 10 characters. Apparently this is because the Query Data Block seems to use a cached/stale copy of the database field sizes, and still expects a size of 20! What we realized now is that we have to go into each of those forms, and REFRESH the Data Block (through the Data Block Wizard) for every one of them.
My question is this: is there anyway to force the Form to refresh those Query Data Blocks absent going into each one and REFRESHING it? We've tried compiling through Forms Developer, and through Batch Compiles, and nothing seems to get those cached copies to update. I'd really prefer to tackle this issue once and for all since we are prepping for migration testing. Frankly I suspect the table space was tweaked a good bit over the years since development (before I ever got here), and if they didn't REFRESH those Data Blocks properly, a great many of the Forms will be suffering this same cached/stale view problem.
Appreciate your thoughts,
DaveQ_Stephenson,
That's an excellent suggestion. I have seen vague hints and allegations of Forms manipulation using that method, but never felt comfortable with my overall knowledge(*) of Forms to look at it that deep. I think it's time to clear some space and dig into the topic for a better look.
Thank you,
Dave
(*) The majority of my programming background is in Java; it's only been recently that I've had to really dig deep into Forms. -
Query giving performance issues.
Hi All,
Following query is giving performance issues. Query execution is taking around 11 minutes. Our client requirement is to get the data for the query in 30 sec to 1 min. Please suggest.
SELECT
DISTINCT r.rptid, p.product_id, p.vnd_dscr, p.vendor_cd, p.Firm_Cd, a.is_mm_sweep IsMoneyMarket
FROM
dev.ac_cube a,
dev.rpt_master_rep_list_view r,
dev.cur_ps_cube p
WHERE a.repid = r.rep_id
AND a.accountkey = p.accountkey
AND p.product_id IS NOT NULL
AND p.product_id != 'CASH'
AND r.RPTID = '42817'
Number of distinct records fetched by above query : 34445
Number of records in dev.ac_cube table : 13.6 million
Number of records in dev.cur_ps_cube table : 7 million
Number of records in dev.rpt_master_rep_list_view for RPTID '42817' : 118354
repid, product_id is indexed column in dev.ac_cube table. accountkey is primary key in dev.ac_cube table.
rep_id is indexed column in base table on which dev.rpt_master_rep_list_view view is createdThe output is not complete as i expected. Have you followed the steps I have mentioned in my earlier post
Also when posting output enclose between two {*code*} ...{*code*} (remove * within braces). It displays everything between the tags as proper formatted output otherwise its really hard to read and understand
See sample below. However you need to get the session id, sql id, display_cursor output exactly in same way as mentioned in my previous post
SQL> set arraysize 200 timing on serveroutput on linesize 200;
SQL> set autotrace traceonly explain statistics;
SQL> select level from dual connect by level <= 10000;
10000 rows selected.
Elapsed: 00:00:00.09
Execution Plan
Plan hash value: 1236776825
| Id | Operation | Name | Rows | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 2 (0)| 00:00:01 |
| 1 | CONNECT BY WITHOUT FILTERING| | | | |
| 2 | FAST DUAL | | 1 | 2 (0)| 00:00:01 |
Statistics
1 recursive calls
0 db block gets
0 consistent gets
0 physical reads
0 redo size
57406 bytes sent via SQL*Net to client
919 bytes received via SQL*Net from client
51 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
10000 rows processed
SQL>
{code} -
SQL query slow when issued by app, fast when issued mnaually
Hi there,
I have a more general question about a specific Oracle behaviour.
I update a feature from within an application. The application doesn't respond and I finally have to terminate it. I checked Oracle whether a query is running long using the following statement:
select s.username,s.sid,s.serial#,s.last_call_et/60 mins_running,q.sql_text from v$session s
join v$sqltext_with_newlines q
on s.sql_address = q.address
where status='ACTIVE'
and type <>'BACKGROUND'
and last_call_et> 60
order by sid,serial#,q.piece
The result of the above query is:
WITH CONNECTION AS ( SELECT * FROM WW_CONN C WHERE (C.FID_FROM I
N (SELECT FID FROM WW_LINE WHERE FID_ATTR=:B1 ) AND C.F_CLASS_ID
FROM =22) OR (C.FIDTO IN (SELECT FID FROM WW_LINE WHERE FID_AT
TR=:B1 ) AND C.F_CLASS_ID_TO =22) ) SELECT MIN(P.FID_ATTR) AS FI
D_FROM FROM CONNECTION C, WW_POINT P WHERE (P.FID = C.FID_FROM A
ND C.F_CLASS_ID_FROM = 32 AND C.FLOW = 1) OR (P.FID = C.FID_TO A
ND C.F_CLASS_ID_TO = 32 AND C.FLOW = 2)
I have a different tool which shows me the binding parameter values. So I know that the value for :B1 is 5011 - the id of the feature being updated. This query runs for 20 mins and longer before it eventually stops. The update process involves multiple sql statements - so this one is not doing the update but is part of the process.
Here is the bit I do not understand: when I run the query in SQL Developer with value 5011 for :B1 it takes 0.5 secs to return a result.
Why is it, that the sql statement takes so long when issued by the application but takes less than a second when I run it manually?
I sent a dump of the data to the application vendor who is not able to reproduce the issue in their environment. Could someone explain to me what happens here or give me some keywords for further research?
We are using 11gR2, 64bit.
Many thanks,
RobHi Rob,
at least you should see some differences in the statistics for the different child cursor (the one for the execution in the application should show at least a higher value for ELAPSED_TIME). I would use something like the following query to check the information for the child cursors:
select sql_id
, PLAN_HASH_VALUE
, CHILD_NUMBER
, EXECUTIONS
, ELAPSED_TIME
, USER_IO_WAIT_TIME
, CONCURRENCY_WAIT_TIME
, DISK_READS
, BUFFER_GETS
, ROWS_PROCESSED
from v$sql
where sql_id = your_sql_idRegards
Martin -
SQL Query Having performance issues
I need help on rewriting this query, I am having performance issues with the way it is now. I create a temporary table and query against it. Any help will be appreciated. Thanks, Antonio
Here it is:
create global temporary table pr_php_elig_tmp
on commit preserve rows as
SELECT UNIQUE A.SAK_PROV, A.CDE_SERVICE_LOC, a.sak_short
FROM T_PR_PHP_ELIG A,
T_PR_TYPE C
WHERE C.SAK_PROV = A.SAK_PROV
AND C.CDE_SERVICE_LOC = A.CDE_SERVICE_LOC
AND C.CDE_PROV_TYPE not in ('01', '03', '08', '24', '27', '31')
AND A.SAK_PROV_PGM not in (11, 13)
AND A.DTE_END >= :il_current_date
AND A.DTE_EFFECTIVE <= :il_prev_18_months
AND NOT EXISTS (
SELECT 'X'
FROM T_PR_GRP_MBR T
WHERE T.SAK_PROV = A.SAK_PROV
AND T.CDE_SVC_LOC_MBR = A.CDE_SERVICE_LOC)
AND NOT EXISTS (
select a.sak_prov, a.cde_service_loc
from t_pmp_svc_loc d
where a.sak_prov = d.sak_prov
and a.cde_service_loc = d.cde_service_loc
and d.dte_end >= :il_current_date)
ORDER BY A.SAK_PROV, A.CDE_SERVICE_LOC;
select * from pr_php_elig_tmp
minus
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_dntl_dtl temp01
WHERE temp01.sak_prov_perf = a.sak_prov
and temp01.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp01.DTE_FIRST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp01.DTE_FIRST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_dntl_hdr temp02
WHERE ( (temp02.prov_billing = a.sak_prov
and temp02.cde_service_loc = a.cde_service_loc)
OR (temp02.sak_prov_perf = a.sak_prov
and temp02.cde_perf_svc_loc = a.cde_service_loc)
OR (temp02.sak_prov_referring = a.sak_prov
and temp02.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp02.sak_prov_referring_2 = a.sak_prov
and temp02.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp02.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp02.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_phrm_hdr temp03
WHERE ( (temp03.prov_billing = a.sak_prov and
temp03.cde_service_loc = a.cde_service_loc)
OR (temp03.sak_prov_rendering = a.sak_prov and
temp03.cde_svc_loc_rend = a.cde_service_loc)
OR (temp03.sak_presc_prov = a.sak_prov and
temp03.cde_svc_loc_presc = a.cde_service_loc)
OR temp03.id_prov_prescrb = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp03.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp03.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_phys_dtl temp04
WHERE ( (temp04.sak_prov_perf = a.sak_prov
and temp04.cde_svc_loc_rend = a.cde_service_loc)
OR (temp04.sak_prov_referring = a.sak_prov
and temp04.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp04.sak_prov_referring_2 = a.sak_prov
and temp04.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp04.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp04.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_phys_hdr temp05
WHERE ( (temp05.prov_billing = a.sak_prov
and temp05.cde_service_loc = a.cde_service_loc)
OR (temp05.sak_prov_perf = a.sak_prov
and temp05.cde_perf_svc_loc = a.cde_service_loc)
OR (temp05.sak_prov_referring = a.sak_prov
and temp05.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp05.sak_prov_referring_2 = a.sak_prov
and temp05.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp05.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp05.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_ub92_dtl temp06
WHERE ( (temp06.sak_pr_other = a.sak_prov
and temp06.cde_scv_loc_other = a.cde_service_loc)
OR (temp06.sak_pr_other_2 = a.sak_prov
and temp06.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp06.sak_pr_attend = a.sak_prov
and temp06.cde_svc_loc_attend = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp06.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp06.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_deny_ub92_hdr temp07
WHERE ( (temp07.prov_billing = a.sak_prov
and temp07.cde_service_loc = a.cde_service_loc)
OR (temp07.sak_pr_facility = a.sak_prov
and temp07.cde_svc_loc_fa = a.cde_service_loc)
OR (temp07.sak_pr_other = a.sak_prov
and temp07.cde_svc_loc_other = a.cde_service_loc)
OR (temp07.sak_pr_other_2 = a.sak_prov
and temp07.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp07.sak_pr_attend = a.sak_prov
and temp07.cde_svc_loc_attend = a.cde_service_loc)
OR temp07.id_prov_attend = to_char(a.sak_prov) || a.cde_service_loc
OR temp07.id_prov_other = to_char(a.sak_prov) || a.cde_service_loc
OR temp07.id_prov_other_2 = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp07.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp07.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_dntl_dtl temp08
WHERE temp08.sak_prov_perf = a.sak_prov
and temp08.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp08.DTE_FIRST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp08.DTE_FIRST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_dntl_hdr temp09
WHERE ( (temp09.prov_billing = a.sak_prov
and temp09.cde_service_loc = a.cde_service_loc)
OR (temp09.sak_prov_perf = a.sak_prov
and temp09.cde_perf_svc_loc = a.cde_service_loc)
OR (temp09.sak_prov_referring = a.sak_prov
and temp09.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp09.sak_prov_referring_2 = a.sak_prov
and temp09.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp09.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp09.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_pharm_hdr temp10
WHERE ( (temp10.prov_billing = a.sak_prov
and temp10.cde_service_loc = a.cde_service_loc)
OR (temp10.sak_prov_rend = a.sak_prov
and temp10.cde_svc_loc_rend = a.cde_service_loc)
OR (temp10.sak_presc_prov = a.sak_prov
and temp10.cde_svc_loc_presc = a.cde_service_loc)
OR temp10.id_prov_prescrb = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp10.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp10.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_phys_dtl temp11
WHERE ( (temp11.sak_prov_perf = a.sak_prov
and temp11.cde_svc_loc_rend = a.cde_service_loc)
OR (temp11.sak_prov_referring = a.sak_prov
and temp11.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp11.sak_prov_referring_2 = a.sak_prov
and temp11.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp11.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp11.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_phys_hdr temp12
WHERE ( (temp12.prov_billing = a.sak_prov
and temp12.cde_service_loc = a.cde_service_loc)
OR (temp12.sak_prov_perf = a.sak_prov
and temp12.cde_perf_svc_loc = a.cde_service_loc)
OR (temp12.sak_prov_referring = a.sak_prov
and temp12.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp12.sak_prov_referring_2 = a.sak_prov
and temp12.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp12.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp12.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_ub92_dtl temp13
WHERE ( (temp13.sak_pr_other = a.sak_prov
and temp13.cde_scv_loc_other = a.cde_service_loc)
OR (temp13.sak_pr_other_2 = a.sak_prov
and temp13.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp13.sak_pr_attend = a.sak_prov
and temp13.cde_svc_loc_attend = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp13.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp13.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim01.t_pd_ub92_hdr temp14
WHERE ( (temp14.prov_billing = a.sak_prov
and temp14.cde_service_loc = a.cde_service_loc)
OR (temp14.sak_pr_facility = a.sak_prov
and temp14.cde_svc_loc_fa = a.cde_service_loc)
OR (temp14.sak_pr_other_2 = a.sak_prov
and temp14.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp14.sak_pr_attend = a.sak_prov
and temp14.cde_svc_loc_attend = a.cde_service_loc)
OR (temp14.sak_pr_other = a.sak_prov
and temp14.cde_svc_loc_other = a.cde_service_loc)
OR temp14.id_prov_attend = to_char(a.sak_prov) || a.cde_service_loc
OR temp14.id_prov_other = to_char(a.sak_prov) || a.cde_service_loc
OR temp14.id_prov_other_2 = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp14.DTE_FINAL) >= :il_prev_18_months
OR NVL(MAX(temp14.DTE_FINAL),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_dental_dtl temp15
WHERE temp15.sak_prov_perf = a.sak_prov
and temp15.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp15.DTE_FIRST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp15.DTE_FIRST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_dental_hdr temp16
WHERE ( (temp16.sak_prov_perf = a.sak_prov
and temp16.cde_perf_svc_loc = a.cde_service_loc)
OR (temp16.sak_prov_referring = a.sak_prov
and temp16.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp16.sak_prov_referring_2 = a.sak_prov
and temp16.cde_svc_loc_ref_2 = a.cde_service_loc)
OR (temp16.prov_billing = a.sak_prov
and temp16.cde_service_loc = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING ((MAX(temp16.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp16.DTE_LAST_SVC),0) = 0)
and (MAX(temp16.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp16.DTE_BILLED),0) = 0) )
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_phrm_hdr temp17
WHERE ( (temp17.prov_billing = a.sak_prov
and temp17.cde_service_loc = a.cde_service_loc)
OR (temp17.sak_prov_rend = a.sak_prov
and temp17.cde_svc_loc_rend = a.cde_service_loc)
OR (temp17.sak_presc_prov = a.sak_prov
and temp17.cde_svc_loc_presc = a.cde_service_loc)
OR temp17.id_prov_prescrb = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp17.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp17.DTE_BILLED),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_phys_dtl temp18
WHERE ( (temp18.sak_prov_perf = a.sak_prov
and temp18.cde_svc_loc_rend = a.cde_service_loc)
OR (temp18.sak_prov_referring = a.sak_prov
and temp18.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp18.sak_prov_referring_2 = a.sak_prov
and temp18.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp18.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp18.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_phys_hdr temp19
WHERE ( (temp19.prov_billing = a.sak_prov
and temp19.cde_service_loc = a.cde_service_loc)
OR (temp19.sak_prov_perf = a.sak_prov
and temp19.cde_perf_svc_loc = a.cde_service_loc)
OR (temp19.sak_prov_referring = a.sak_prov
and temp19.cde_svc_loc_ref_1 = a.cde_service_loc)
OR (temp19.sak_prov_referring_2 = a.sak_prov
and temp19.cde_svc_loc_ref_2 = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING ((MAX(temp19.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp19.DTE_LAST_SVC),0) = 0)
and (MAX(temp19.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp19.DTE_BILLED),0) = 0) )
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_ub92_dtl temp20
WHERE ( (temp20.sak_pr_other = a.sak_prov
and temp20.cde_scv_loc_other = a.cde_service_loc)
OR (temp20.sak_pr_other_2 = a.sak_prov
and temp20.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp20.sak_pr_attend = a.sak_prov
and temp20.cde_svc_loc_attend = a.cde_service_loc)
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp20.DTE_LAST_SVC) >= :il_prev_18_months
OR NVL(MAX(temp20.DTE_LAST_SVC),0) = 0
union
select a.sak_prov, a.cde_service_loc, a.sak_short from pr_php_elig_tmp a, aim00.t_susp_ub92_hdr temp22
WHERE ( (temp22.prov_billing = a.sak_prov
and temp22.cde_service_loc = a.cde_service_loc)
OR (temp22.sak_pr_facility = a.sak_prov
and temp22.cde_svc_loc_fa = a.cde_service_loc)
OR (temp22.sak_pr_other_2 = a.sak_prov
and temp22.cde_svc_loc_other_2 = a.cde_service_loc)
OR (temp22.sak_pr_attend = a.sak_prov
and temp22.cde_svc_loc_attend = a.cde_service_loc)
OR (temp22.sak_pr_other = a.sak_prov
and temp22.cde_svc_loc_other = a.cde_service_loc)
OR temp22.id_prov_attend = to_char(a.sak_prov) || a.cde_service_loc
OR temp22.id_prov_other = to_char(a.sak_prov) || a.cde_service_loc
OR temp22.id_prov_other_2 = to_char(a.sak_prov) || a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX(temp22.DTE_BILLED) >= :il_prev_18_months
OR NVL(MAX(temp22.DTE_BILLED),0) = 0
);Perhaps an approach like this would work better. No promises, but it's worth a try.
SELECT *
FROM pr_php_elig_tmp a
WHERE NOT EXISTS (
SELECT a.sak_prov,
a.cde_service_loc,
a.sak_short
FROM aim01.t_deny_dntl_dtl temp01
WHERE temp01.sak_prov_perf = a.sak_prov
AND temp01.cde_svc_loc_perf = a.cde_service_loc
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX (temp01.dte_first_svc) >= :il_prev_18_months
OR NVL (MAX (temp01.dte_first_svc), 0) = 0)
AND NOT EXISTS (
SELECT a.sak_prov,
a.cde_service_loc,
a.sak_short
FROM aim01.t_deny_dntl_hdr temp02
WHERE ( ( temp02.prov_billing = a.sak_prov
AND temp02.cde_service_loc = a.cde_service_loc)
OR ( temp02.sak_prov_perf = a.sak_prov
AND temp02.cde_perf_svc_loc = a.cde_service_loc)
OR ( temp02.sak_prov_referring = a.sak_prov
AND temp02.cde_svc_loc_ref_1 = a.cde_service_loc)
OR ( temp02.sak_prov_referring_2 = a.sak_prov
AND temp02.cde_svc_loc_ref_2 = a.cde_service_loc))
GROUP BY a.sak_prov, a.cde_service_loc, a.sak_short
HAVING MAX (temp02.dte_final) >= :il_prev_18_months
OR NVL (MAX (temp02.dte_final), 0) = 0) -
SQL Query : Order By issue with HUGE Table
Hello friends,
I have been through a terrible issue with order by. I would appreciate your help. Please let me know, your input for my case:
=> if i run select query it returns result quick in some milliseconds. (sql dev. fetches 50 rows at a time)
=> if i run select query with where condition and column (say A) in where condition is even indexed and i have order by and that order by column (say B) is also indexed.
Now, here is the issue:
1. if no. of rows with that where condition can filter yielding small result set then order by works fine .. 1-5 sec which is good.
2.*if no. of rows with that where condition can filter yielding Large result set, say more than 50,000 then with order by then the wait time is exponential.... i have even waited 10+ mins to get the result back for 120,000 records.*
Is order by takes that long for 100K records ... i think something else if wrong... your pointer will really be helpful... i am very new to sql and even newer for large table case.
I am using SQL Developer Version 2.1.1.64
and Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
Thank you so much.
Edited by: 896719 on Jan 11, 2013 8:38 AMYes you are correct, but my concentration was on order by thing, so it will do full scan of table so i was putting that ... and was also wondering if millions of record in table should not be a issue...???
Any way for the explain plan , when just a value in the where changes there is the huge difference i want to point out too as below:
SELECT
FROM
EES_EVT EES_EVT where APLC_EVT_CD= 'ABC' ORDER BY CRE_DTTM DESC
execution time : 0.047 sec
Plan hash value: 290548126
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 27 | 14688 | 25 (4)| 00:00:01 |
| 1 | SORT ORDER BY | | 27 | 14688 | 25 (4)| 00:00:01 |
| 2 | TABLE ACCESS BY INDEX ROWID| EES_EVT | 27 | 14688 | 24 (0)| 00:00:01 |
|* 3 | INDEX RANGE SCAN | XIE1EES_EVT | 27 | | 4 (0)| 00:00:01 |
Predicate Information (identified by operation id):
3 - access("APLC_EVT_CD"='ABC')
Note
- SQL plan baseline "SYS_SQL_PLAN_6d41e6b91925c463" used for this statement
=============================================================================================
SELECT
FROM
EES_EVT EES_EVT where APLC_EVT_CD= 'XYZ' ORDER BY CRE_DTTM DESC
execution : 898.672 sec.
Plan hash value: 290548126
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 121K| 62M| | 102K (1)| 00:11:02 |
| 1 | SORT ORDER BY | | 121K| 62M| 72M| 102K (1)| 00:11:02 |
| 2 | TABLE ACCESS BY INDEX ROWID| EES_EVT | 121K| 62M| | 88028 (1)| 00:09:27 |
|* 3 | INDEX RANGE SCAN | XIE1EES_EVT | 121K| | | 689 (1)| 00:00:05 |
Predicate Information (identified by operation id):
3 - access("APLC_EVT_CD"='XYZ')
Note
- SQL plan baseline "SYS_SQL_PLAN_ef5709641925c463" used for this statementAlso Note this table contains 74328 MB data in it.
Thanks -
SQL Query Sorting Order issue - Help needed
Hi All,
I am using the following query in my project to display the records in the grid.
/* Formatted on 04-09-2013 PM 8:01:51 (QP5 v5.149.1003.31008) */
SELECT eol,
status_msg,
relation,
building_name,
device_id id,
CEIL (SYSDATE - updated_date) duration,
lab_id,
aisle_id,
aisle_location_id,
ip_address,
port,
slot_num,
hostname,
pid,
description,
sl_num,
eitms_code,
status,
dnd_flag,
aisle,
aisle_location,
spname,
os_version,
user_id,
TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
isterm_svr,
net_type,
DEVICE_GROUP_REF,
cmd_id_ref,
LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
AS testbeds_id_ref,
LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
AS testbeds_names,
spname || '-' || ip_address || '-' || port AS child_asset_group
FROM DEVICE_TESTBED_VW
WHERE lab_id IN
('7099849',
'10769617',
'4258712',
'10513562',
'10515074',
'5882676',
'8330925')
GROUP BY eol,
status_msg,
relation,
device_id,
lab_id,
aisle_id,
aisle_location_id,
ip_address,
port,
slot_num,
hostname,
pid,
description,
sl_num,
eitms_code,
status,
dnd_flag,
aisle,
aisle_location,
spname,
os_version,
user_id,
updated_date,
isterm_svr,
net_type,
DEVICE_GROUP_REF,
cmd_id_ref,
building_name
ORDER BY building_name ASC,
LOWER (child_asset_group) ASC,
LOWER (relation) DESC
The problem is , if any one sorting with any column , the order is not correct
In this below code , i have done sorting by port . But the result data order is not correct .
/* Formatted on 04-09-2013 PM 8:07:02 (QP5 v5.149.1003.31008) */
SELECT eol,
status_msg,
relation,
building_name,
device_id id,
CEIL (SYSDATE - updated_date) duration,
lab_id,
aisle_id,
aisle_location_id,
ip_address,
port,
slot_num,
hostname,
pid,
description,
sl_num,
eitms_code,
status,
dnd_flag,
aisle,
aisle_location,
spname,
os_version,
user_id,
TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
isterm_svr,
net_type,
DEVICE_GROUP_REF,
cmd_id_ref,
LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
AS testbeds_id_ref,
LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
AS testbeds_names,
spname || '-' || ip_address || '-' || port AS child_asset_group
FROM DEVICE_TESTBED_VW
WHERE lab_id IN
('7099849',
'10769617',
'4258712',
'10513562',
'10515074',
'5882676',
'8330925')
GROUP BY eol,
status_msg,
relation,
device_id,
lab_id,
aisle_id,
aisle_location_id,
ip_address,
port,
slot_num,
hostname,
pid,
description,
sl_num,
eitms_code,
status,
dnd_flag,
aisle,
aisle_location,
spname,
os_version,
user_id,
updated_date,
isterm_svr,
net_type,
DEVICE_GROUP_REF,
cmd_id_ref,
building_name
ORDER BY PORT ASC
Can some one help me to fix this issue?Hi,
Sorry, it's not clear what you want.
Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Simplify the problem as much as possible. For example, if you really need to GROUP BY 28 columns, post a problem where you need to GROUP BY only 2 or 3 columns. (Just explain that you really have 28, so people will give solutions that are sure to work for all 28).)
Always say which version of Oracle you're using (for example, 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
SAP Query selection screen issues after ECC upgrade
Hi all
We have a custom query created and assigned to a custom transaction code, which after upgrade to ECC 6.0 we find that the selection screen layout is different from what was available in 4.6C system.
All the fields required are available.
However, the sequence of the fields on the screen is different from the 4.6C after the upgrade.
Can anyone help identify the issue so that the issue can be resolved?
Thanks
Vinodh SHi N_niki
There is no resolution as such.
We had raised a Customer message with SAP and were informed that this was expected as the procedure to execute the reports was changed in ECC when compared to 4.6 (technical changes) and hence this issue shall remain for some queries wherein the old changes need to be brought back using an option in the SAP Query.
Please refer to SAP Note # 723577 which could provide a better explanation for the issue.
Hope this helps.
Thanks
Vinodh Sudhakaran -
Hi,
I have a SAP query which was the following code which is causing a timeout issue when running the report, can anyone suggest how I can change the code to make it more efficent?
* This gets the sum of all labour costs on WBSEs.
clear X_COEP_WKGBTR_LAB_W.
if PRPS-OBJNR is not initial.
select sum( WKGBTR ) from COEP
into X_COEP_WKGBTR_LAB_W
where
PERIO = ZPERIODT
and
GJAHR = ZYEAR
and
KSTAR >= 'A43'
and
KSTAR =< 'A43ZZZZZZZ'
OR
KSTAR = '0005767012'
and
OBJNR = PRPS-OBJNR.
endif.
thanks
JoeHi Joe,
I see none of the Key fields were used in select query.
Create a secondary index for the table and use it in select query.
It increases the performance.
COEP~1 and COEP~2 are already existing.
select sum( WKGBTR ) from COEP
into X_COEP_WKGBTR_LAB_W
where
PERIO = ZPERIODT
and
GJAHR = ZYEAR
and
KSTAR >= 'A43'
and
KSTAR =< 'A43ZZZZZZZ'
OR
KSTAR = '0005767012'
and
OBJNR = PRPS-OBJNR
%_HINTS ORACLE 'INDEX("COEP" "COEP~1").
Thanks,
Anil -
Query manager View issue in PIA
Hi,
When i navigate through reporting tools,Query,querymanager i am not able to see options
like records,query,expressions,prompts.Fields,Criteria,Having,Viewsql,Run in Query manager window.
When i go to the Application designer and tried to run Querys it was working fine.
DO i need to any thing to see options in query manager window of PIA.
Please help in fixing the issue.See if you user has a permission list that gives access to the QUERY_MANAGER menu and its related components and the Pages page.
-
Query Performance Related Issue
Hi all,
We have a problem when we are executing the Query in BI 7.0. that is
When we are executing the query first time it will take 2 minutes time .
when we are executing the same query second time ( With out logoff the query designer ) it will take 5seconds.
please give me some inputs how it is taking more time at the first time ?
How to reduce the query execution time for the first time?
Already we have tried all the Query performance options.
Thanks & regards,
Kiran Manyam.Hi Kiran,
As the others pointed, when you have executed the query for the 2nd time, it might have read from the cache.
Do the following to investigate the performance issue:
1) Go to RSRT and run your query in "Execute in debug mode"
2) Select "Display Statistics Data", check "Do not use cache"
3) After running the query, press the back button. The system will show a the statistics summary.
4) Analyze what activity has the highest run time.
5) If Data Manager time is >= than 30% of the query time and the if the ratio of number of records selected VS the number of records transfered is > 10% then, build an aggregate to help the query run time. This sacrifices data load time but will improve query execution time.
To know what aggregate will help, run the query in debug mode again and choose the option "Display aggregates found". If the query did not hit an aggregate, the names of the cubes will appear. Use the data in the suggestions column (maked with S: ) as a basis for your aggregate.
Hope this helps.
Maybe you are looking for
-
Dear cons We want to create a new document type for pur. requisition.In this document type account assignment will be 'P'(PROJECT) . w.b.s should be only enter. so pl. give the details of filling data in the required field step by step. waiting for
-
Is there a way to make notes visible in Day or Week view without opening the event's edit window? Thanks.
-
IPhone no longer able to join Airport wireless
Hello fellow Apple users, I have an iPhone 4 and an Airport Extreme 802.11n (4th g). It all used to work fine until a couple of weeks ago. I did not make any changes to the AP. The Airport is running the latest (7.5.2) and the iPhone is on 5.0. T
-
Filter/Exclude two specific characteristics values
Hi, I need to filter specific combination of two characteristic values. Example, I have two characteristics CH1 and CH2 with values CH1 CH2 A X B Y C Z My requirement is to filter the records only when CH1=A AND CH2=X. Oth
-
Hi all, I had Oracle XE running on a Fedora Core3 system and it was all well till the power failed and now i am unable to start Oracle after a reboot. Sqlplus says listner not running (ora-12541) but "lsnrctl status" shows it to be running. What coul