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

Similar Messages

  • 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

  • How to empty out Olap Cache for a query?

    Hi experts,
    I think the olap cache for a query should be resetted to zero after a data load (right?), if i have understood well how it works. Where can i check the olap cache for the query?  I'd like to ckeck the change of the Olap Cache for a specific query.
    I checkt in the Cache Monitor but I haven't found any data.
    Francesco

    Hi
    You can use the Transaction code RSRCACHE
    Regards
    N Ganesh

  • Pre-fill the OLAP cache for a query on Data change event  of infoprovider

    Hi Gurus,
    I have to pre-fill the OLAP cache for a query,which has bad performance.
    I read a doc 'Periodic Jobs and Tasks in SAP BW'
    which suggested sum steps to do this
    i hav created the setting for Bex broadcasting for scheduling job Execution with data change in info provider
    thereafter doc says  "an event has to be raised in the process chain which loads the data to this InfoProvider.When the process chain executes the process u201CTrigger Event Data Change (for Broadcaster)u201D, an event is raised to inform the Broadcaster that the query can be filled in the OLAP cache."
    how can this b done please provide with sum proper steps
    Answers are always appreciated.
    Thanks.

    Hi
    U need to create a process chain or use the existing process chain which you are using to load your current solution, just add event change process type in the process chian  and inside it add the info provider which are going to be affected.
    Once you are done with this go to the broadcaster  and  create new setting for that query...you will see the option for event data chainge in infoprovider just choose that  and create the settings.
    hope it helps

  • 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

  • Breaking FMS Caching For Specific Video(s)

    We occasionally run into a condition that appears to require cache breaking. If a user rotates a video that has been recently played and the video is currently in the FMS cache, subsequent requests for the video will continue to show the unrotated video.
    Is there a way to break the FMS cache for a specific video? If not, I would be equally curious for a way to clear the cache completely, though this is going to cause a much larger performance hit than I would hope for.

    AVI is a wrapper... what is inside your wrapper?
    Codec & Format information, read both links in reply #1 http://forums.adobe.com/thread/1270588
    Report back with the codec details of your file, use the programs below... A screen shot works well to SHOW people what you are doing
    http://forums.adobe.com/thread/592070?tstart=30 for screen shot instructions
    For PC/Mac http://mediaarea.net/en/MediaInfo/Download

  • Re: relationship caching for dynamic query finder

    "Carlos Muchiutti" <[email protected]> wrote:
    I have the same scenario ... is there an answer for this?
    "Haoguang" <[email protected]> wrote in message
    news:3e2e64af$[email protected]..
    Is there any way to using the relationship caching defined in thedeployment descriptor
    for the dynamic query?
    I suppose it should be one of the properties passed to the query findmethod (Query.query.find(String,
    Properties)).
    I was unable to locate any documentation or examples for the question.
    What is the key set the Properties? I know the "GROUP_NAME" is one,which
    I found
    via Google. Bravo to the documentation of bea!
    ps, We are using Weblogic 7 with sp1.
    Your help or comments will be appreciated.
    Try the stuff described in:
    http://e-docs.bea.com/wls/docs70/ejb/EJB_environment.html#1151177

    There is no information related to dynamic query finder with relationship caching.

  • Wrong cache for input-ready query

    Dear Expert,
    I encountered some issues about input-ready query. When I first open one input-ready query and input some plan data, I can save the data successfully. But after I saved data for the first query, if I don't re-connect the analyzer and open a new query, usually the plan data in the new query can not be saved successfully. After re-connect the analyzer, it works well. When I debug it, if I do not re-connect analyzer, I found the new query I opened still got some data which belong to the first query (Such as variable value). I guess it probably caused by some Bex cache? (It's not OLAP cache in RSCACHE, as we have disabled the cache for planning query in RSRT).
    Could you please help me with this? Is there any way we can disable this kind of cache for the input-ready query? Or if we have any solution to clear this kind of cache without re-connect bex analyzer every time when I open a new input-ready query.
    Thank you in advance.
    Best Regards,
    Fuyang

    Hi Fuyang,
    We are facing similar problem.
    1st problem:
    (1) When we run workbook that time variable values are automatically filled up.
    (2) Variable values for version, year is filled up and then query output is displaying.
    (3) There is no personalization or variant used. Its looks to me Values are coming from Cache.
    (4) Cleared RSRCACHE and there is no cache used for this query.
    (5) If we enter version = u201CZ2010u201D and Year = u201C2010u201D and after running workbook (input query) and then closing and reopening same variable values are coming. If we change version from u201CZ2010u201D to u201CZ2011u201D and run/save query and again reopening version variable values are coming again to u201CZ2010u201D.
    2nd problem:
    (1) We have planning sequence which is using below variables.
    (2) Version, Year, Plant.
    (3) Version and Year is input ready variables
    (4) Plant is Userexit variable.
    (5) Plant Dropdown is used.
    (6)When we execute planning sequence first time without filtering plant then it is working fine. Receiving message u201C100 records read,100 records changedu201D u2013 This is working fine.
    (7) When we use plant dropdown and filtering u201CABCu201D plant then planning sequence working fine and receiving message u201C20 records read, 20 records changedu201D u2013 This is working fine.
    (8)When we clear drop down/filter using CMD - REMOVE FILTER which is used in button clear plant u201CABCu201D filter. u2013 This is working fine.
    (9) Then we again apply planning sequence for all the records and receiving message u201C20 records read, 20 records changedu201D.  This is not working. The message should come u201C100 records read,100 records changedu201D
    This time plant variable has still with value u201CABCu201D and not clearing in variable cache.
    We are on below BI 7 level and above application is Excel based.
    SAP_ABA u2013 701-SAPKA70104
    SAP_BASIS-701-SAPKB70104
    SAP_BW-701-SAPKW70104
    BI_CONT-701-SAPK-70403INBICONT
    SAP GUI  7.1 patch 17
    SAP BI BEx AddOn 7.1 patch 10 (1000)
    Any help will be greatly appreciated.
    Thanks in advance.

  • OLAP Cache for Query Performance

    Hi Experts,
    I have below 2 Questions before we implement OLAP Cache for our Queries:
    1) We have 15 imporatant queries - which do NOT have any variable/selection screen.
    (question here is will it work for those kind of queries which dont have any selection screen/ variant ? ) --> client wants to prime the cache for few queries which dont have variable screen.
    In this case, say if data is later filtered on any CHAR , will it take the data from Cache?
    2) I have a query which initially will have few characteristics in the drill down when we first execute and users would be drilling down on many other characteristics after that. So if I want to fill OLAP cache for this query then what is the best way so that each drilldown in the query gets data from cache.
    Thank you,
    -Su

    Hi Raghavendra,
    Thanks for your response.
    For first Question, Do you mean , even if we do not have any Selection varaibale on Query--we still can fill OLAP cache for it for its all values (i.e. No selection means "*") ?
    If this is the case, then what we need to defile in General Precalculation (Variable assignment) while creating a new setting for the query.
    Thanks,
    -Su

  • Purge Cache for a Specific Business Model

    Hi everyone,
    I have a obiee(11) report purging all cache entries (as Call SAPurgeAllCache()). Is there a method to purge cache partially for specific business model entries and not to purge all the cache ?
    Thanks ...

    Hi,
    To selectively purge, you could use SAPurgeCacheByQuery, SAPurgeCacheByTable or SAPurgeCacheByDatabase. Alternatively, Event Polling Tables may help. See http://docs.oracle.com/cd/E23943_01/bi.1111/e10541/querycaching.htm#i1005542 and http://docs.oracle.com/cd/E23943_01/bi.1111/e10541/querycaching.htm#i1010207.
    Also see the section on BI Server caching here : http://www.rittmanmead.com/2013/03/optimising-obiee-performance-tuning/
    SET VARIABLE DISABLE_CACHE_HIT = 1
    It will purge the cache for that report.This is just wrong. DISABLE_CACHE_HIT only DISABLES cache use for the query execution, it does not PURGE it
    You may go for this DISABLE_CACHE_SEED for more info http://docs.oracle.com/cd/E23549_01/bi.1111/e10540/variables.htm
    What's the point of DISABLING use of the cache, if the OP wants to use the cache?
    set the cache persistence time for the related physical tables. so based on the time interval u set, at that time specific tables only will get cache purged.This is only the time from which the entry got loaded into the cache, so is not a good way to manage the purging of the cache usually - because it has no relation to when the data got loaded to the database

  • How to clear Local-Cache Entries for a Query in BW?

    Hi There,
    i`m student und i need please your help for my Thesis!!
    I execute the same Query many times in BEx Web Analyzer und note a Query Response Time under ST03N using each time a different READ Mode and Cache Mode is inactiv (Query Monitor RSRT).
    First time i exectue the Query, it reads also from database, second time it uses the local Cache and  that `s okay!
    My problem is:
    When i change the Read mode and execute the Query again, it uses for the first run also the old entries from the Cache so i get wrong response time for the first run!!
    I know that while the mode cache inactiv , the local cache will still be used, so how can i delete the local cache entries each
    time i change the read mode and execute the Query? In Cache monitor (rsrcache) i find only entries for Global cache etc..
    I've already tried to close the session and login in to the System again but it doesn`t solve the Problem!!
    i don't have a permission (access rights) to switch off the complete Cache (local and global ).
    Any idea please??
    Thanks und Best Regards,
    Rachidoo
    P.S: sorry for my bad english!! i have to refresh it soon:)

    Hi Praba,
    the entries stored in RSRCACHE are for global cache, there is no entry for my query in Cache monitor!
    i execute the query in RSRT using java web button and cache mode inactiv so, the results will be stored in local cache.
    this is as below what i want to do for my performance tests in my Thesis:
    1. run a query for the first time with cache inactiv and note runtime of it
    2. run the query again with cache inactiv and note runtime of it
    3. clear the local cache (i don't know how to do it??)
    4. change the read mode of query in RSRT then run the same query for the first time and note runtime of it
    5. run the query again and note runtime of it.
    i'm doing the same procedure for each Read mode.
    the problem is in step 4 , The olap Processor gets the old results form the cache so i get wrong runtime for my tests.
    Generate the report doesn't help, any idea please?

  • How to invalidate cache for a single item?

    I m trying to invalidate cache for a particular item in the repository.
    I dont want to invalidate the whole cache.
    Is there a way to do that through dyn/admin?
    TIA

    You can create own component in dyn/admin to do this.
    1. Create a global component with the following properties
    /atg/dynamo/service/GSAInvalidatorService
    [repository of item to invalidate]
    [itemDescriptor]
    [repositoryId]
    2. Create method invalidateCache
    getGSAInvalidatorService().invalidate(getRepository(), getItemDescriptor(), getRepositoryId());
    or, this should work as well
    ItemDescriptor someItemDescriptor;
    someItemDescriptor.removeItemFromCache(getRepositoryId());
    Maybe try them both to see what works for you.
    -Michael

  • 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

  • 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

  • How to create a cache for JPA Entities using an EJB

    Hello everybody! I have recently got started with JPA 2.0 (I use eclipseLink) and EJB 3.1 and have a problem to figure out how to best implement a cache for my JPA Entities using an EJB.
    In the following I try to describe my problem.. I know it is a bit verbose, but hope somebody will help me.. (I highlighted in bold the core of my problem, in case you want to first decide if you can/want help and in the case spend another couple of minutes to understand the domain)
    I have the following JPA Entities:
    @Entity Genre{
    private String name;
    @OneToMany(mappedBy = "genre", cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<Novel> novels;
    @Entity
    class Novel{
    @ManyToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Genre genre;
    private String titleUnique;
    @OneToMany(mappedBy="novel", cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<NovelEdition> editions;
    @Entity
    class NovelEdition{
    private String publisherNameUnique;
    private String year;
    @ManyToOne(optional=false, cascade={CascadeType.PERSIST, CascadeType.MERGE})
    private Novel novel;
    @ManyToOne(optional=false, cascade={CascadeType.MERGE, CascadeType.PERSIST})
    private Catalog appearsInCatalog;
    @Entity
    class Catalog{
    private String name;
    @OneToMany(mappedBy = "appearsInCatalog", cascade = {CascadeType.MERGE, CascadeType.PERSIST})
    private Collection<NovelEdition> novelsInCatalog;
    The idea is to have several Novels, belonging each to a specific Genre, for which can exist more than an edition (different publisher, year, etc). For semplicity a NovelEdition can belong to just one Catalog, being such a Catalog represented by such a text file:
    FILE 1:
    Catalog: Name Of Catalog 1
    "Title of Novel 1", "Genre1 name","Publisher1 Name", 2009
    "Title of Novel 2", "Genre1 name","Pulisher2 Name", 2010
    FILE 2:
    Catalog: Name Of Catalog 2
    "Title of Novel 1", "Genre1 name","Publisher2 Name", 2011
    "Title of Novel 2", "Genre1 name","Pulisher1 Name", 2011
    Each entity has associated a Stateless EJB that acts as a DAO, using a Transaction Scoped EntityManager. For example:
    @Stateless
    public class NovelDAO extends AbstractDAO<Novel> {
    @PersistenceContext(unitName = "XXX")
    private EntityManager em;
    protected EntityManager getEntityManager() {
    return em;
    public NovelDAO() {
    super(Novel.class);
    //NovelDAO Specific methods
    I am interested at when the catalog files are parsed and the corresponding entities are built (I usually read a whole batch of Catalogs at a time).
    Being the parsing a String-driven procedure, I don't want to repeat actions like novelDAO.getByName("Title of Novel 1") so I would like to use a centralized cache for mappings of type String-Identifier->Entity object.
    Currently I use +3 Objects+:
    1) The file parser, which does something like:
    final CatalogBuilder catalogBuilder = //JNDI Lookup
    //for each file:
    String catalogName = parseCatalogName(file);
    catalogBuilder.setCatalogName(catalogName);
    //For each novel edition
    String title= parseNovelTitle();
    String genre= parseGenre();
    catalogBuilder.addNovelEdition(title, genre, publisher, year);
    //End foreach
    catalogBuilder.build();
    2) The CatalogBuilder is a Stateful EJB which uses the Cache and gets re-initialized every time a new Catalog file is parsed and gets "removed" after a catalog is persisted.
    @Stateful
    public class CatalogBuilder {
    @PersistenceContext(unitName = "XXX", type = PersistenceContextType.EXTENDED)
    private EntityManager em;
    @EJB
    private Cache cache;
    private Catalog catalog;
    @PostConstruct
    public void initialize() {
    catalog = new Catalog();
    catalog.setNovelsInCatalog(new ArrayList<NovelEdition>());
    public void addNovelEdition(String title, String genreStr, String publisher, String year){
    Genre genre = cache.findGenreCreateIfAbsent(genreStr);//##
    Novel novel = cache.findNovelCreateIfAbsent(title, genre);//##
    NovelEdition novEd = new NovelEdition();
    novEd.setNovel(novel);
    //novEd.set publisher year catalog
    catalog.getNovelsInCatalog().add();
    public void setCatalogName(String name) {
    catalog.setName(name);
    @Remove
    public void build(){
    em.merge(catalog);
    3) Finally, the problematic bean: Cache. For CatalogBuilder I used an EXTENDED persistence context (which I need as the Parser executes several succesive transactions) together with a Stateful EJB; but in this case I am not really sure what I need. In fact, the cache:
    Should stay in memory until the parser is finished with its job, but not longer (should not be a singleton) as the parsing is just a very particular activity which happens rarely.
    Should keep all of the entities in context, and should return managed entities form mehtods marked with ##, otherwise the attempt to persist the catalog should fail (duplicated INSERTs)..
    Should use the same persistence context as the CatalogBuilder.
    What I have now is :
    @Stateful
    public class Cache {
    @PersistenceContext(unitName = "XXX", type = PersistenceContextType.EXTENDED)
    private EntityManager em;
    @EJB
    private sessionbean.GenreDAO genreDAO;
    //DAOs for other cached entities
    Map<String, Genre> genreName2Object=new TreeMap<String, Genre>();
    @PostConstruct
    public void initialize(){
    for (Genre g: genreDAO.findAll()) {
    genreName2Object.put(g.getName(), em.merge(g));
    public Genre findGenreCreateIfAbsent(String genreName){
    if (genreName2Object.containsKey(genreName){
    return genreName2Object.get(genreName);
    Genre g = new Genre();
    g.setName();
    g.setNovels(new ArrayList<Novel>());
    genreDAO.persist(t);
    genreName2Object.put(t.getIdentifier(), em.merge(t));
    return t;
    But honestly I couldn't find a solution which satisfies these 3 points at the same time. For example, using another stateful bean with an extended persistence context (PC) would work for the 1st parsed file, but I have no idea what should happen from the 2nd file on.. Indeed, for the 1st file the PC will be created and propagated from CatalogBuilder to Cache, which will then use the same PC. But after build() returns, the PC of CatalogBuilder should (I guess) be removed and re-created during the succesive parsing, although the PC of Cache should stay "alive": shouldn't in this case an exception being thrown? Another problem is what to do when the Cache bean is passivated. Currently I get the exception:
    "passivateEJB(), Exception caught ->
    java.io.IOException: java.io.IOException
    at com.sun.ejb.base.io.IOUtils.serializeObject(IOUtils.java:101)
    at com.sun.ejb.containers.util.cache.LruSessionCache.saveStateToStore(LruSessionCache.java:501)"
    Hence, I have no Idea how to implement my cache.. Can you please tell me how would you solve the problem?
    Many thanks!
    Bye

    Hi Chris,
    thanks for your reply!
    I've tried to add the following into persistence.xml (although I've read that eclipseLink uses L2 cache by default..):
    <shared-cache-mode>ALL</shared-cache-mode>
    Then I replaced the Cache bean with a stateless bean which has methods like
    Genre findGenreCreateIfAbsent(String genreName){
    Genre genre = genreDAO.findByName(genreName);
    if (genre!=null){
    return genre;
    genre = //Build new genre object
    genreDAO.persist(genre);
    return genre;
    As far as I undestood, the shared cache should automatically store the genre and avoid querying the DB multiple times for the same genre, but unfortunately this is not the case: if I use a FINE logging level, I see really a lot of SELECT queries, which I didn't see with my "home made" Cache...
    I am really confused.. :(
    Thanks again for helping + bye

Maybe you are looking for

  • Scheduling Agreement & Planning Time Fence

    Hello, I read a lot of articles on Planning Time Fence and the MRP Types P1 to P4 that goes with it. And I have tested it out in a Testing Environment. But I can't get it to do what I need. This is a normal planning with no PTF and MRP Type PD. Somet

  • How to make a class confirm to a specific abstract structure?

    I have a class which should extend one of the swing component and on the other hand implement an interface. i.e. public class A extends JTable implements UpdateData In some other class public class UpdatePanel extends JPanel public void setUpdateComp

  • Mapping error :Collecting file : BpmPatternCollectTime

    Hi I am trying to use Multimapping with BPM,  for 3 files correlated based in some field value but mY collectpattern is not workin, Workflow shows errror in Message Mapping Runtime exception Attach Mapping http://img255.imageshack.us/my.php?image=map

  • 9i Reports Graphic using JSP not showing in Portal

    Using Portal Rel 2, 9iAS Report Server Rel 2, Oracle 9i database and 9iDS Report Builder, SUN servers and Windows2000 (for Builder). I've created 2 reports very simple, using scott.emp table, one tabular (deptno,ename, salary) and one line graph (ena

  • IPhone photo question

    With an iPhone can you send a photo to a picture capable phone? If so, how?