Performance for a Specific Query:

Hi, i am using a multi-threaded java application to execute a stored procedure with bulks of data grouped in an array. I use oracle 9i and this is the SP definition:
create or replace
PROCEDURE IE_SP_SET_BANS_TO_RECLASSIFY(
MIN_AMOUNT IN NUMBER ,
MIN_PAY_ADJ_DATE IN DATE,
RECLA_CANDIDATES IN IE_RECLA_CANDIDATE_TBL )
AS
BEGIN
FOR idx IN 1.. RECLA_CANDIDATES.COUNT
LOOP
INSERT INTO IE_RESUMEN_RECLA
SELECT BA.BAN,
BA.BILL_CYCLE,
BA.COL_NEXT_STEP_NO ,
BA.COL_NEXT_STEP_DATE,
BA.COL_WAIVER_IND ,
BA.STATUS_ACTV_RSN_CODE ,
BA.COL_ASSIGNED_COLL,
BA.COL_PATH_CODE ,
BA.COL_CATEGORY_NO ,
BA.ACCOUNT_TYPE ,
BA.ACCOUNT_SUB_TYPE ,
ADJ.ENT_SEQ_NO,
ADJ.ACTV_DATE,
ADJ.ACTV_AMT,
ADJ.SUBSCRIBER_NO,
' ' AS SOURCE,
ADJ.DESIGNATION,
'ADJ' AS IDENT
FROM CDLAPPC.ADJUSTMENT ADJ
INNER JOIN CDLAPPC.BILLING_ACCOUNT BA
ON(BA.BAN = ADJ.BAN)
WHERE ADJ.BAN = RECLA_CANDIDATES(idx).ban
AND ADJ.BALANCE_IMPACT_CODE = 'I'
AND TRUNC(ADJ.SYS_CREATION_DATE) >= MIN_PAY_ADJ_DATE
AND NVL(ADJ.ACTV_AMT,0) >= MIN_AMOUNT
AND ROWNUM = 1;
IF(SQL%ROWCOUNT = 0) THEN
INSERT INTO IE_RESUMEN_RECLA
SELECT BA.BAN,
BA.BILL_CYCLE,
BA.COL_NEXT_STEP_NO ,
BA.COL_NEXT_STEP_DATE,
BA.COL_WAIVER_IND ,
BA.STATUS_ACTV_RSN_CODE ,
BA.COL_ASSIGNED_COLL,
BA.COL_PATH_CODE ,
BA.COL_CATEGORY_NO ,
BA.ACCOUNT_TYPE ,
BA.ACCOUNT_SUB_TYPE ,
P.ENT_SEQ_NO,
P.DEPOSIT_DATE,
P.ORIGINAL_AMT,
P.SUBSCRIBER_NO,
P.SOURCE_ID,
P.DESIGNATION,
'PAY' AS IDENT
FROM CDLAPPC.PAYMENT P
INNER JOIN CDLAPPC.BILLING_ACCOUNT BA
ON(BA.BAN = P.BAN)
WHERE P.BAN = RECLA_CANDIDATES(idx).ban
AND TRUNC(P.SYS_CREATION_DATE) >= MIN_PAY_ADJ_DATE
AND NVL(P.ORIGINAL_AMT,0) >= MIN_AMOUNT
AND ROWNUM = 1;
END IF;
END LOOP ;
END IE_SP_SET_BANS_TO_RECLASSIFY;
I want to improve it's efficiency but i still do not know how. But possible solutions are:
-i know that a FORALL loop would improve my insert speed but in this case there is a condition so i don't know how to implement it in a forall.
-I want to avoid doing the inner join with billing_account for the query but i do not know if providing the billing_account details in the input table would make it more efficient, is not a lot of data per row, but i am sending 10k rows per SP call, also i am not sure if there will be a lot of context switching with PL/SQL and SQL in case i do that.
Any help would be appreciated, thanks.

Some of the suggestions I can make for improving the Queries are
1) Try using Indexed columns whereever possible , specially when you are joining tables. If there is no index on column that you are using to join ,then either try to use columns which have an index or create a new index on columns if required.
2) Try to see the Explain Plan for the select statements you are uisng. If you are using TOAD, try to use the tool's feature to generate different possible combinations of queries with the least cost. You need to supply TOAD with the problematic SQL statement, it will automatically generate different combinations of SQL statements and then you can choose the one with the least cost or the one with the best Explain plan results.
Hope this helps.
Regards
IQ

Similar Messages

  • CQWP does not return result for a specific query when filtering on a managed metadata field.

    Hi,
    We are facing a serious production issue. We've search the web extensively but to no avail.
    Problem:
    CQWP does not return result for a specific query when filtering on a managed metadata field.
    ULS log:
    The Uls logs provides 3 different messages that I could relate to every time the query is executed. The last item(level Medium) is displayed 14 times. For readability I've moved the ULS logs to the bottom of this question.
    Query:
    The query is as follows:
    (I've translated this from dutch so pardon any typo's)
    Query: (top selection) Display items from all sites in the site collection
    ListType: Documentlibrary
    Contenttype:
    Items from this group:Custom Document Contenttypes
    Items from this content type: Verklaring
    Filter: Soort is equal to X
    extra info: the field soort (Type) is a managed metadata field that was assigned the value X
    Managed Metadata Structure:
    -managed metadata service
      -Contoso
        -Enterprise Taxonomy (term set)
          -Document (term)
            -Verklaring (term)
              -Soort (term)
                -x (term)
    EXTRA INFO:
    When I modify the filter to filter on Title the CQWP DOES return the correct document!
    When I modify the query settings to search a specific library the CWQP also does return the correct document! (In this case I am filtering on a managed metadata field).
    QUESTION:
    Why doesn't the CQWP return the document when filtering on a managed metadata field over the entire site collection.
    Why does the CQWP return the document when filtering on a managed metadata field over a single library.
    (The type of information the CQWP should return (Soort:x) is stored in a dozen document libraries!)
    Here are the ULS logs.
    Product: Web Content Management
    Category Publishing
    Level: Monitorable:
    CrossListQueryCache::GetSiteData() caught exception (Microsoft.SharePoint.SPException: Kan deze actie niet voltooien.  Probeer het opnieuw. ---> System.Runtime.InteropServices.COMException (0x80004005): Kan deze actie niet voltooien.  Probeer
    het opnieuw.     bij Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns)    
    bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns)     --- Einde van intern uitzonderingsstackpad
    ---     bij Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery,
    ISP2DSafeArrayWriter pCallback, Object& pvarColumns)     bij Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query)     bij Microsoft.SharePoint.Publishing.CachedArea.GetSiteData(SPWeb web, SPSiteDataQuery
    siteDataQuery, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CachedArea.GetCrossListQueryResults(SPSiteDataQuery query, SPWeb currentContext, Boolean onlyPopulateCache, Boolean useSpQueryOnList, Int32 lcid)    
    bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea cachedArea, SPWeb web, SPSiteDataQuery query, Boolean useSpQueryOnList)) for query:  '<ViewFields><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"
    Nullable="True" Type="Text"/><FieldRef ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}" Nullable="True" Type="Lookup"/><FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" Nullable="True"
    Type="Counter"/><FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Nullable="True" Type="DateTime"/><FieldRef ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" Nullable="True" Type="User"/><FieldRef
    ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Nullable="True" Type="User"/><FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime"/><FieldRef ID="{30bb605f-5bae-48fe-b4e3-1f81d9772af9}"
    Nullable="True" Type="Lookup"/><FieldRef ID="{ba3c27ee-4791-4867-8821-ff99000bac98}" Nullable="True" Type="Text"/><FieldRef ID="{c5c4b81c-f1d9-4b43-a6a2-090df32ebb68}" Nullable="True"
    Type="Lookup"/><FieldRef ID="{8fca95c0-9b7d-456f-8dae-b41ee2728b85}" Nullable="True" Type="Lookup"/><FieldRef ID="{39360f11-34cf-4356-9945-25c44e68dade}" Nullable="True" Type="Text"/><FieldRef
    ID="{543bc2cf-1f30-488e-8f25-6fe3b689d9ac}" Nullable="True" Type="Image"/><FieldRef ID="{43bdd51b-3c5b-4e78-90a8-fb2087f71e70}" Nullable="True" Type="Number"/><FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}"
    Nullable="True" Type="Note"/><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}" Nullable="True" Type="Lookup"/><FieldRef Name="ScopeId" /><FieldRef Name="_Level" /><FieldRef
    Name="UniqueId" /><ListProperty Name="DraftVersionVisibility" /></ViewFields><Lists ServerTemplate="101"></Lists><Webs Scope="Recursive" /><RowLimit>45</RowLimit><Query><Where><And><BeginsWith><FieldRef
    Name="ContentTypeId" Nullable="True" Type="ContentTypeId"/><Value Type="ContentTypeId">0x010100C5FEE83B67FA6445B0C14AE8B7761BB8011E</Value></BeginsWith><In><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}"
    LookupId="TRUE"/><Values><Value Type="Counter">783</Value></Values></In></And></Where><OrderBy><FieldRef ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True"
    Type="DateTime" Ascending="FALSE"/></OrderBy></Query>' at url: /. Titel webonderdeel: Inhoudsquery
    Product: Web Content Management
    Category Publishing
    Level: Warning
    Error occured while processing a Content Query Web Part. Performing the following query '<ViewFields><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Nullable="True" Type="Text"/><FieldRef ID="{94f89715-e097-4e8b-ba79-ea02aa8b7adb}"
    Nullable="True" Type="Lookup"/><FieldRef ID="{1d22ea11-1e32-424e-89ab-9fedbadb6ce1}" Nullable="True" Type="Counter"/><FieldRef ID="{28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f}" Nullable="True"
    Type="DateTime"/><FieldRef ID="{1df5e554-ec7e-46a6-901d-d85a3881cb18}" Nullable="True" Type="User"/><FieldRef ID="{d31655d1-1d5b-4511-95a1-7a09e9b75bf2}" Nullable="True" Type="User"/><FieldRef
    ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime"/><FieldRef ID="{30bb605f-5bae-48fe-b4e3-1f81d9772af9}" Nullable="True" Type="Lookup"/><FieldRef ID="{ba3c27ee-4791-4867-8821-ff99000bac98}"
    Nullable="True" Type="Text"/><FieldRef ID="{c5c4b81c-f1d9-4b43-a6a2-090df32ebb68}" Nullable="True" Type="Lookup"/><FieldRef ID="{8fca95c0-9b7d-456f-8dae-b41ee2728b85}" Nullable="True"
    Type="Lookup"/><FieldRef ID="{39360f11-34cf-4356-9945-25c44e68dade}" Nullable="True" Type="Text"/><FieldRef ID="{543bc2cf-1f30-488e-8f25-6fe3b689d9ac}" Nullable="True" Type="Image"/><FieldRef
    ID="{43bdd51b-3c5b-4e78-90a8-fb2087f71e70}" Nullable="True" Type="Number"/><FieldRef ID="{9da97a8a-1da5-4a77-98d3-4bc10456e700}" Nullable="True" Type="Note"/><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}"
    Nullable="True" Type="Lookup"/><FieldRef Name="ScopeId" /><FieldRef Name="_Level" /><FieldRef Name="UniqueId" /><ListProperty Name="DraftVersionVisibility" /></ViewFields><Lists
    ServerTemplate="101"></Lists><Webs Scope="Recursive" /><RowLimit>45</RowLimit><Query><Where><And><BeginsWith><FieldRef Name="ContentTypeId" Nullable="True" Type="ContentTypeId"/><Value
    Type="ContentTypeId">0x010100C5FEE83B67FA6445B0C14AE8B7761BB8011E</Value></BeginsWith><In><FieldRef ID="{aea3cd20-8da0-4cb7-803b-5a33079a0e4d}" LookupId="TRUE"/><Values><Value Type="Counter">783</Value></Values></In></And></Where><OrderBy><FieldRef
    ID="{8c06beca-0777-48f7-91c7-6da68bc07b69}" Nullable="True" Type="DateTime" Ascending="FALSE"/></OrderBy></Query>' generated the following error: Kan deze actie niet voltooien.  Probeer het opnieuw.
    at the following url: /. Titel webonderdeel: Inhoudsquery
    Kan deze actie niet voltooien. Probeer het opnieuw. This is Dutch. It means something like: Cannot complete this action. Please try again.
    Product: Web Content Management
    Category Publishing
    Level: Medium (this message is displayed 14 times)
    ConsoleUtilies.GetContextualControlMode had no currentPage so the current SPWebPartManager mode cannot be retrieved.

    Hi,
    while digging through the logging (again) I found some extra logging regarding the same correlation id (see details below).
    We have a fairly large term store (4000+ lines).
    If somebody has a clue or tip that would greatly appreciated!
    03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa42 Monitorable A large block of literal text was sent to sql.  This can result in blocking in sql and excessive memory use on the front
    end.  Verify that no binary parameters are being passed as literals, and consider breaking up batches into smaller components.  If this request is for a SharePoint list or list item, you may be able to resolve this by reducing the number of fields. 1971313a-6baa-49e9-bace-d024ce67f25c
    03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa43 High Slow Query Duration: 127.1515 1971313a-6baa-49e9-bace-d024ce67f25c
    03-19-2014 13:49:51.87 w3wp.exe (0x2098) 0x23BC SharePoint Foundation Database fa44 High Slow Query StackTrace-Managed:    bij Microsoft.SharePoint.Utilities.SqlSession.OnPostExecuteCommand(SqlCommand command,
    SqlQueryData monitoringData)     bij Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)     bij Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean
    retryfordeadlock)     bij Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)     bij Microsoft.SharePoint.Library.SPRequestInternalClass.CrossListQuery(String bstrUrl, String bstrXmlWebs, String
    bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter pCallback, Object& pvarColumns)     bij Microsoft.SharePoint.Library.SPRequest.CrossListQuery(String bstrUrl, String bstrXmlWebs, String bstrXmlLists, String bstrXmlQuery, ISP2DSafeArrayWriter
    pCallback, Object& pvarColumns)     bij Microsoft.SharePoint.SPWeb.GetSiteData(SPSiteDataQuery query)     bij Microsoft.SharePoint.Publishing.CachedArea.GetSiteData(SPWeb web, SPSiteDataQuery siteDataQuery, Boolean
    useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CachedArea.GetCrossListQueryResults(SPSiteDataQuery query, SPWeb currentContext, Boolean onlyPopulateCache, Boolean useSpQueryOnList, Int32 lcid)     bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea
    cachedArea, SPWeb web, SPSiteDataQuery query, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(CachedArea ca, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.CrossListQueryCache.GetSiteDataResults(SPSite
    site, String webUrl, Boolean useSpQueryOnList)     bij Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.IssueQuery()     bij Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.GetXPathNavigator(String
    viewPath)     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform)     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.PerformSelect()    
    bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.DataBind()     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.EnsureDataBound()     bij Microsoft.SharePoint.WebPartPages.DataFormWebPart.CreateChildControls()    
    bij System.Web.UI.Control.EnsureChildControls()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()    
    bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Control.PreRenderRecursiveInternal()     bij System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     bij System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     bij System.Web.UI.Page.ProcessRequest()    
    bij System.Web.UI.Page.ProcessRequest(HttpContext context)     bij ASP.BLANKWEBPARTPAGE_ASPX_1653093133.ProcessRequest(HttpContext context)     bij Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext
    context)     bij System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     bij System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)    
    bij System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     bij System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     bij System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
    wr, HttpContext context)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr
    managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32
    flags)     bij System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags) 1971313a-6baa-49e9-bace-d024ce67f25c

  • Need help in improving the performance for the sql query

    Thanks in advance for helping me.
    I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. The data count which is updated in the target table is 2 million records and the target table has 15 million records.
    Any suggestions or solutions for improving performance are appreciated
    SQL query:
    update targettable tt
    set mnop = 'G',
    where ( x,y,z ) in
    select a.x, a.y,a.z
    from table1 a
    where (a.x, a.y,a.z) not in (
    select b.x,b.y,b.z
    from table2 b
    where 'O' = b.defg
    and mnop = 'P'
    and hijkl = 'UVW';

    987981 wrote:
    I was trying to improve the performance of the below query. I tried the following methods used merge instead of update, used bulk collect / Forall update, used ordered hint, created a temp table and upadated the target table using the same. The methods which I used did not improve any performance. And that meant what? Surely if you spend all that time and effort to try various approaches, it should mean something? Failures are as important teachers as successes. You need to learn from failures too. :-)
    The data count which is updated in the target table is 2 million records and the target table has 15 million records.Tables have rows btw, not records. Database people tend to get upset when rows are called records, as records exist in files and a database is not a mere collection of records and files.
    The failure to find a single faster method with the approaches you tried, points to that you do not know what the actual performance problem is. And without knowing the problem, you still went ahead, guns blazing.
    The very first step in dealing with any software engineering problem, is to identify the problem. Seeing the symptoms (slow performance) is still a long way from problem identification.
    Part of identifying the performance problem, is understanding the workload. Just what does the code task the database to do?
    From your comments, it needs to find 2 million rows from 15 million rows. Change these rows. And then write 2 million rows back to disk.
    That is not a small workload. Simple example. Let's say that the 2 million row find is 1ms/row and the 2 million row write is also 1ms/row. This means a 66 minute workload. Due to the number of rows, an increase in time/row either way, will potentially have 2 million fold impact.
    So where is the performance problem? Time spend finding the 2 million rows (where other tables need to be read, indexes used, etc)? Time spend writing the 2 million rows (where triggers and indexes need to be fired and maintained)? Both?

  • Replacement path does not work for a specific query after migration 7.0

    Hello all,
    We have a problem with a replacement path variable in a query.
    After the migration, it seems this replacement path doesn't work.  This replacement path is defined inside a structure that is used in some other queries and for the other queries is working properly.
    Another think we have done is to make a copy of the query where the replacement path doesn't work and the copied query works ok.
    Did anybody find this kind of problem in a migration. Any help will be appreciated.
    Regards, Inma

    This is just for those who might have simmilar requirement &  would in case refer to this thread..
    Me too faced same problem of OLE DB for OLAP cant be released. I was using  replacement path query variable which was using result set from the other  query.
    I just had to uncheck 'Allow External Access' in release for OLE  DB for OLAP in query properties. This worked from me, my query using replacement path variable is giving desired results.
    Hope this might be useful for relevant users.
    Regards,
    Pritesh

  • Query Elements Description for a specific query - Useful for Translation

    Hello everyone,
    I would like to know how I can determine a list of all query elements (with their Element ID) within a single query. So, based on a query (technical name), I would like to have a list of all query elements used.
    I would prefer a list of Element IDs, so then I can check if the proper description of each element is available in different languages (in table RSZELTTXT).
    Or if there is a handy tool to check wether all elements are properly translated (and then I don't mean the translation module in the Adlinistration Workbnech, because it is not handy or opening Bex Query designer in different languages), please let me know.
    Kind regards from Belgium,
    Ben De Windt

    Hi,
    Please check for personalization, if the userid has hidden it?
    Regards,
    Harsha

  • Programatically validate/invalidate cache for specific query

    Hi,
    I am looking to programatically invalidate and re-instantiate the cache for a specific query.
    I know how to perform this manually via RSRT, RSRT1/2....etc. What I am looking for is a way to schedule this and programatically control caching on specific query.
    Any help would be wonderful!!
    Thanks!

    hi Dong Suk Choi ,
    the technical information which u have furnished clearly says that the settings
    that u have made does not enable the query to use cache.
    u can enhance cache by customizing the inforovider or in the transaction rsrt
    even if the concerned query does not have required settings u can make them in rsrt tcode.
    goto rsrt set the read mode and cache mode as u wish, however default settings would give optimum performance.
    and run the query.
    in the rsrt screen a push button execute + debug enter that and unmark the check box do not use cache.
    hope this helps.
    reward points if helpful.
    bye.
    under properties tab u can give the query settingMessage was edited by:
            Rakesh Elangovan

  • Programatically invalidate/validate cache for specific query

    Hi,
    I am looking to programatically invalidate and re-instantiate the cache for a specific query.
    I know how to perform this manually via RSRT, RSRT1/2....etc. What I am looking for is a way to schedule this and programatically control caching on specific query.
    Any help would be wonderful!!
    Thanks!

    hi Dong Suk Choi ,
    the technical information which u have furnished clearly says that the settings
    that u have made does not enable the query to use cache.
    u can enhance cache by customizing the inforovider or in the transaction rsrt
    even if the concerned query does not have required settings u can make them in rsrt tcode.
    goto rsrt set the read mode and cache mode as u wish, however default settings would give optimum performance.
    and run the query.
    in the rsrt screen a push button execute + debug enter that and unmark the check box do not use cache.
    hope this helps.
    reward points if helpful.
    bye.
    under properties tab u can give the query settingMessage was edited by:
            Rakesh Elangovan

  • Turning off BIA for an individual query

    Hi,
      Can anybody where I can go to turn off BIA for a specific query?
    Thanks

    Hi BW Novice,
    I think there is a little bit of confusion within this thread regarding your problem. There are also wrong answers, I am afraid. If I understood you right you want to turn off a BIA index for a specific query, i.e., all other queries that touch the respective cube will still be processed by BIA.
    If you follow thoroughly the below steps you will probably get what you need:
    1) Goto to transaction SE16 and enter RSRREPDIR as the table name and click the Table Contents button (upper left.)
    2) In the resulting selection screen, enter the name for the INFOCUBE that you would like to switch off for the query and press execute (the tick symbol.) Before, in order to help yourself in finding the correct query name later more easily, you might want to choose Settings  -> Fields for Selection from the menu and then check the COMPID field in the resulting window.
    3) In the resulting RSRREPDIR screen, the queries are listed by name in the column COMPID. Select the respective query and then press the Change button (the little pencil symbol.)
    4) There will be a list of fields displayed. Goto NOHPA (you might have to scroll a little bit further down) and check it, i.e., set it to true.
    That's it. Do not forget to set the flag back after your tests have been done.
    Best regards,
    Sascha.

  • Estimating range of performance for a query

    I wonder if this is an intractable problem:
    Using information available from the data dictionary and from the tables referenced in a query, estimate actual minimum and maximum run times for a given query, predict performance for various combinations of realistic values for the variables that influence performance.
    Variables would include:
    what kinds of IO are used
    how much of each type of IO is used
    atpr - average time per read for various types of IO
    data relationships - min/max/avg #child records per parent record
    server caching - how many gets require IO
    clustering factor of indexes
    I think a related item would be client caching
    continued rows - how many per N primary rows
    Type of plan - initally I think perhaps all NL and all hash joins are simple starting points
    Some of the variables are observable from target systems ( atpr, data relationships, clustering factor, .. ).
    I know, the optimizer already does this.
    I know, it's faster to just run test queries.
    Repeated work with such ideas would cause refinement of the method and
    eventually might result in reasonably accurate estimates and improved understanding
    of the variables involved in query performance, the latter being more important
    than the former.
    Please tell me why this is a bad or good idea. I already mentioned a couple of counter-arguments above,
    please don't bother elaborating on them unless you're shedding light and not flaming. I think this would be
    somewhat like the index evaluation methods in Lahdenmaki/Leach's book, but more Oracle-centric.
    Or maybe I'm kidding myself..

    Justin Cave wrote:
    Could you possibly invert the problem a bit and use some statistical process control techniques to set some baselines and to identify statements that are moving outside of their control limits?
    For example, a control chart could be built for each SQL statement based on actual execution performance data in the AWR-- you just need to know the average and the standard deviation execution time for that which should be relatively easy to derive. You can then gather the performance data for every snapshot interval, add a new data point to the chart. There are a number of different sets of rules for determining a "signal" from this data as opposed to normal random variation. That would generally be a reasonable way for everyone to agree on what performance should really be expected for a SQL statement and it would be a good early warning system that "something has changed" when you see a particular query start to run consistently slower (or faster) than it had been. That, in turn, might lead to better discussions, i.e. "sql_id Y is starting to run more slowly than we were expecting based on prior testing because we just introduced Process X that is generating a pile of I/O in the same window your query runs in. We can adjust Y's baseline to incorporate this new reality. Or we can move when Y runs so that it isn't competing with X. Or we can try to optimize Y further. Or we can get the folks that own X and Y into a room and determine how to meet everyone's requirements". Particularly if your performance testing can identify issues in test before the new Process X code goes into prod.
    JustinThose are interesting ideas. Better discussions would be a good thing.
    Re inverting the problem from prediction to reaction:
    I have done some work with the script at http://kerryosborne.oracle-guy.com/2008/10/unstable-plans/ which of course work only for as much AWR data as you keep. I've had mixed results. I haven't tried to set it up to alert me about problems or to monitor a specific set of sql_ids. I've found it to be useful when users/developers are complaining about general slowness but won't give you any useful details about what is slow.
    Here are a few complicating factors re identifying significant divergences in query performance or resource use - There are queries that accept different inputs that rightly generate completely different workloads for the same query, e.g., a product/location/time query whose inputs allow wide variations in the selectivity for each of the dimensions. There are applications that never heard of a bind variable, and there are queries that rightly do not use bind variables ( yes, even in the age of sql injection ).
    In general , aside from the usual Grid Control and Nagios alerts re CPU/Memory/IO thresholds, and some blocking-locks alert programs, it's up to our users/developers to report performance problems.
    Re my original question - I'll admit I was pretty sleep deprived when I wrote it. Sleep deprivation isn't usually conducive to clear thinking, so it will be interesting to see how this all looks in a month. Still, given that so much testing is affected by previous test runs ( caching ), I thought it made sense to try to understand the worst-performing case for a given execution plan. It's not a good thing to find that the big query that was tested to death and gave users a certain expectation of run time runs in production on a system where the caches have been dominated for the last N hours by completely unrelated workloads, and that when the query runs every single block must be read from a spindle, giving the users a much slower query than was seen in test.
    Maybe the best way to predict worst-case performance is to work from the v$ metrics from test, manipulating the metrics to simulate different amounts of caching and different IO rates, thus generating different estimates for run-time.

  • Filtering a Query result for a specific value of a key figure

    Hi folks,
    I want to filter a query for a specific value of a key figure. The report should display all customer who has an account balance greater than EUR 500'000.
    Can I only implement this kind of filter via a condition in Query-Designer? If I run that query on an InfoCube with non-cumulative key figures over all our customers (> 400'000) I have problems with the consumption of the memory. If I restrict the amount of the customers to 50'000 - 60'000 then it works. It seems that the query reads all customer records in an internal table before applying the condition.
    Is there another way to deal with? Any help appreciated.
    Kind regards
    Hansjörg Luzi
    Graubündner Kantonalbank
    CH-7002 Chur

    You could try to implement an alternative solution: define a new Characteristc with discrete values (in the following example I suppose to have intervals of 10)
    KF -> CHAR
    115 -> 110 (110 <= KF < 120)
      5 ->   0 (  0 <= KF <  10)
    83 ->  80 ( 80 <= KF <  90)
    Then you can use these dicrete values to filter ...
    I know that it's not so "flexible" (discetization must be predefined), but query response time is quicker and you can use Aggregates ...
    Hope it helps
    GFV

  • Cache mode for specific query

    Hello BI guys,
    This is Calvin from Korea. We are implementing BI 7.0 and have some severe performance problem. For some queries they don't use cache mode, even though the global cache are used.
    When I checked these kind of queries by performance information in RSRT, I got following message,
    ===================================================
    InfoProvider Definition                |
    ===================================================  
    ZCOAG0101                             | At Least One InfoProvider Not InfoCube 
    ZCOAG0101                             | Not All InfoProviders Can Use Aggregates 
    ===================================================
    ===================================================
    Query Definition                        |
    ===================================================
    Read Mode                               | Do Not Read upon Drilling Navigation/ Hierarchy 
    Query Cannot                           |  Use the Cache  Reason 
    Cache Mode                             | Cache Not Used By Query 
    Cache Update                           | Query Does Not Use Delta Process 
    Type of SP Grouping for Delta Cache Process  | No Provider Partitioning 
    ===================================================
    And after run of technical information,
    ===================================================
    Cache-Relevant Data                 |
    ===================================================
    Query Can Use the Cache         |  No 
    Query Generation Time              | 2007.09.17 15:05:31 
    InfoProvider - Last Data Change  | 2007.09.16 21:43:11 
    Last Load of Exchange Rates     | 2007.07.13 15:01:48
    ===================================================
    Does anybody have ideas for this problem?
    Your help will be highly appreciated and get points!
    Thanks in advance
    Regards,
    Worried Calvin

    hi Dong Suk Choi ,
    the technical information which u have furnished clearly says that the settings
    that u have made does not enable the query to use cache.
    u can enhance cache by customizing the inforovider or in the transaction rsrt
    even if the concerned query does not have required settings u can make them in rsrt tcode.
    goto rsrt set the read mode and cache mode as u wish, however default settings would give optimum performance.
    and run the query.
    in the rsrt screen a push button execute + debug enter that and unmark the check box do not use cache.
    hope this helps.
    reward points if helpful.
    bye.
    under properties tab u can give the query settingMessage was edited by:
            Rakesh Elangovan

  • Query Builder - Getting Universelist for one specific Group

    Hi All,
               I am in need of a query string (in query builder) that will return me All the universes for a specific group.Is it possible to do and if possible what will be the way to do this?
    Thanks in advance for your help,
    Anirban

    Hi Anirban,
    What is the BusinessObjects version you are using ( i.e. BO XIR2 or BOXI 3.0)?
    Regards,
    Deepti Bajpai

  • Parameters to be considered for tuning the QUERY Performance.

    Hi Guys
    I wanted to identify the Query which is taking more resources through the Dynamic performance views and not through OEM.I wanter to tune the Query.
    Please suggest me on this. Also i wanted to know what are all the parameters to be considered for tuning a query like Query execution time, I/O Hits, Library cache hits, etc and from which performance view these paramaters can be taken. I also wanted to know how to find the size of library cache and how much queries can be holded in a library cache and what will be the retention of queries in library cache and how to retrive the queries from Library cache.
    Thanks a lot
    Edited by: user448837 on Sep 23, 2008 9:24 PM

    Hmm there is a parameter called makemyquery=super_fast, check that ;-).
    Ok jokes apart, your question is like asking a doctor that when a person is sick than how to troubleshoot his sickeness? So does a doctor start giving medicine immediately? No right? He has to check some symptoms of the patient. The same is applicable to the query also. There is no view as such which would tell you the performance of the query ie it is good or bad. Tell me if a query is taking up 5 minutes and I come and tell you this, what would you say its good or bad or the query took this much CPU time what would you say, its too much or too less? I am sure your answers would be "it depends". That's the key point.
    The supermost point in the performance check is two things, one the plan of the query. What kind of plan optimizer took for the query and whether it was really good or not? There are millions os ways to do som ething but the idea is to do it in the best way. That's what the idea of reading explain plan. I would suggest get your self familiar with explain plan's various paths and their pros and cons. Also about the query's charectristics, you can check V$sql, v$sqlarea , V$sql_text views.
    Your other question that you want to check the size of the library cache , its contents and the retention, I would say that its all internally managed. You never size library cache but shared pool only. Similary the best bet for a dba/developer is to check the queries are mostly shareable and there wont be any duplicate sqls. So the cursor_sharing parameter can be used for this. The control is not given to us to manage the rentention or the flushing of the queries from the cache.
    HTH
    Aman....

  • How to query the opening balance for an specific account for an spec. date

    Hi all,
    for my user query I need to calculate the opening balance for an cash account for an specific date.
    Any ideas, how can I do this?
    Or may be you know a field in an SBO table that already contains information I need...
    Best Regards,
    Inna

    Hi Inna,
    to find the opening balance for an account or a business partner, please see SAP Note [1114253|https://service.sap.com/sap/support/notes/1114253] :
    Symptom
    How to find the opening balance of a business partner or G/L account.
    Other terms
    Account, customer, supplier, vendor, creditor, debitor, start, initial, first, opening balance, business partner, G/L, SAP Business One
    Reason and Prerequisites
    Consulting
    Solution
    There are several possible approaches:
    Approach 1 - Business Partner Opening Balance:
    1. Go to Business Partners -> Business Partner Master Data -> find the Business Partner
    2. Click on the orange link arrow next to the field 'Account Balance' in the header region of the window.
    3. Untick the boxes next to 'Posting date from', 'Display' and 'Display Unreconciled Trans. Only'.
    4. Click on the button 'Refresh'.
    5. Find 'OB' in the column 'Origin', this is the opening balance journal entry.
    Approach 2 - Business Partner Opening Balance:
    1. Go to Business Partners -> Business Partner Master Data.
    2. Click on the orange link arrow next to the field 'Account Balance' in the header region of the window.
    3. Untick the boxes next to 'Posting date from', 'Display' and 'Display Unreconciled Trans. Only'.
    4. Click on the button 'Refresh'.
    5. Double click on the column header 'Posting Date' to find the earliest transaction on the business partner account. This transaction could be opening balance, verify this with the company accountant.
    Approach 3 - G/L Account Opening Balance:
    1. Go to Financials -> Chart of Accounts -> click on the account name once.
    2. Click on the orange link arrow next to the field 'Balance'.
    3. Untick the boxes next to 'Posting date from', 'Display' and 'Display Unreconciled Trans. Only'.
    4. Click on the button 'Refresh'.
    5. Find 'OB' in the column 'Origin', this is the opening balance journal entry.
    Approach 4 - Business Partner and/or G/L Account Opening Balance:
    1. If using SAP Business One 2005 SP01 or earlier, go to Reports -> Query Generator -> click on 'Execute'.
    2. If using SAP Business One 2007 or later, go to Tools -> Queries -> Query Generator -> click on 'Execute'.
    3. Ignore the red system message in the bottom of the screen.
    4. Click on the pencil icon in the top left of the window, the field with 'SELECT *' will change colour to white, then yellow when activated by clicking in the field.
    5. Copy the query below:
               SELECT T0.[TransId], T0.[Debit], T0.[Credit] , T0.[CreatedBy], T0.[TransType] FROM [dbo].[JDT1]  T0 WHERE T0.[TransType] = '-2'  and T0.[ShortName]  = '[%1]'
    6. Click on 'Save' and give the query an appropriate name and select the appropriate category.
    7. Click on 'Execute'.
    8. Click on 'Existing Values'.
    9. Select the G/L account or the Business Partner name from the list and click on 'OK'.
    10. The system message 'Records retrieved by this query #' (# = number of records) will pop up. Click on 'OK'.
    All the best,
    Kerstin

  • How can I perform data logging for a specific time??

    hello everyone,
    I am quite new in labview and I have a basic question regarding data logging. Currently I am using a cRIO9074 and doing some data logging for my test. The data logging it self works ok so far.
    But my problem is I would like to write my datas in a text file either for a specific time interval (ex)10 seconds) or for a specific amounts of data (ex)500 Samples). Can anyone give me some help regarding my problem?? Attached you can find my RT.vi 
    I would appreciate for anyhelp!
    Regards
    Yun 
    Attachments:
    BP250 Encoder Position & Velocity (Host).vi ‏92 KB

    Run your loggging program for that time. When your program terminates then it will write all the logged data so far in text file.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

Maybe you are looking for

  • Can anyone recommend a Fixup to change any Pantone names in a PDF from C to U?

    Hi I have tried running several pre-flights and fix-ups to analyse a file and change the colours within a PDF from either Pantone "C" to "U" or "U" to "C". It seems to flag a warning in the pre-flight but when I try to use a fix-up to change the name

  • How can I recover my previously opened tabs / restore session?

    HI, I've been struggling the last few days to get back all the opened tabs I had in my Firefox window. My deault setting was to resume the Firefox session from where it was when I last exited Firefox. But some weird toolbar got somehow installed in m

  • [SOLVED] Loosing Wireless Connection

    I am constantly loosing my wireless connection while I am trying to download something, usually I don't reach 60 MB and it's gone. I am also loosing my connection while browsing the internet for 2-3 hours. In both cases it reconnects after 2 minutes

  • Mac OSX 10.5.8 ate my textedit document!

    I write using TextEdit. I use only a LaCie USB hard drive, which I have to use since the internal HD broke one week after warranty. When it got bumped, my Macbook Pro froze. I shut the lid to hibernate, but it would not restart when I opened the lid.

  • Response with multiple namespaces...

    Hi there! We have several webservices working as "document", they receive a XML document and send a XML document as response. The problem is that the returned document has a namespace prefix for each XML tag. All of then with the same name space: [n1