Querying objects not in the NamedCache

The wiki topic on querying (http://wiki.tangosol.com/display/COH32UG/Querying+the+Cache ) points out that a query will "apply only to currently cached data".
     This seems fairly logical because it seems unreasonable to expect the cache to hold onto information that it has already evicted.
     If you were to design a DAO layer (following http://wiki.tangosol.com/display/COH32UG/Managing+an+Object+Model ) using the first of the following architectures:
     1. Direct Cache access:
     App <---> NamedCache <---> CacheStore <---> DB
     2. Direct Cache and DB-DAO access:
     App
     |
     CacheAwareDAO <---> CacheStore <---> DB
     |
     NamedCache
     |
     CacheStore
     |
     DB
     you would then have a situation where you would not be able to query evicted data.
     So by using the 2nd strategy I assume you would probably always want to bypass the cache for all queries other than by primary key, to ensure that you are always querying the entire persistent population.
     This seems a little coarse grained and also reduces the utility of the Coherence cache (unless the bulk of your queries are by primary key).
     Can anybody tell me if my assumption is wrong and if there are any usage strategies the mitigate this aspect?
     Thx,
     Ben

Hi Rob,     >
     > Why would you need 2 separate caches?
     the first cache would have eviction policy, and caches values, but does not have indexes
     the second would not have eviction, does not store data, but has index updates on changes.
     This way you have a fully indexed but not stored data-set, similarly to the difference between stored and indexed attributes Lucene.
     > Why not just
     > maintain a index within each cache so that every
     > entry causes the index to get updated inline (i.e.
     > synchronously within the call putting the data into
     > the cache)?
     >
     You cannot manually maintain an index, because that is not a configurable extension point (it is not documented how an index should be updated manually). You have to rely on Coherence to do it for you upon changes to entries in the owned partitions.
     And since Coherence code does remove index references to evicted or removed data, therefore the index would not know about the non-cached data.
     Or did I misunderstood on how you imagine the indexes to be maintained? Did you envision an index separate from what Coherence has?
     > (You may have to change Coherence to do this.....)
     Changing Coherence was exactly what I was trying to avoid. I tried to come up with things within the specified extension points, and the allowed things, although it might be possible that I still did not manage to remain within the allowed set of operations.
     Of course, if changing Coherence is allowed, allowing an option of filtering index changes to non-eviction events is probably the optimal solution.
     > And I don't think that the write-behind issue would
     > be a problem, as the current state cache of the cache
     > (and it's corresponding index) reflects the future
     > state of the backing store (which accordingly to
     > Coherence's resilience guarantee will definitely
     > occur).
     >
     The index on the second cache in the write-behind scenario would be out-of-synch only if the second cache is updated by invocations to the cache-store of the first cache. If it is updated upon changes to the backing map, then it won't. Obviously if you don't have 2 caches, but only one, it cannot be out-of-synch.
     > So you would have a situation where cache evictions
     > occur regularly but the index just overflows to disk
     > in such a fashion that relevant portions of it can be
     > recalled in an intelligent fashion, leveraging some
     > locality of reference for example.
     >
     I don't really see, how this could be done. AFAIK, all the indexes Coherence has are maintained in memory and does not overflow to disk, but I may be wrong on this, but again, I may have misunderstood what you refer on index handling.
     > a) you leverage locality of reference by using as
     > much keyed data access as possible
     > b) have Coherence do the through-reading
     > c) use database DAO for range querying
     > d) if you were to use Hibernate for (c), you might be
     > able to double dip by using Coherence as an L2 cache.
     > (I don't know if this unecessarily duplicates cached
     > data....)
     >
     > Any thoughts on this?
     a: if you know ids on your own, then this is the optimal solution, provided cache hit rates can be driven high enough. if you have to query for ids, the latency might be too high.
     b: read-through can become suboptimal, since AFAIK, currently the cache store reads all rows one by one, only read-ahead uses loadAll, but I may be wrong on this. Loading from database can be optimized for multiple id loading as well, to be faster than the same via cache store. So it is very important that the cache hit rate be very high for performance-relevant data in case of read-through.
     c: use database dao for complex querying, possibly almost anything more complex than straight top-down queries. make performance tests for both solutions, try to rely on partition affinity, and try to come up with data structures that help with making indexes which can be queried with as few queries as possible, and with not too high index access count.
     d: you cannot query by Coherence on Hibernate second-level cache, as Hibernate second-level caches do not contain structured data, but contain byte[][]s or byte[], holding the column values serialized to it (separately or the same byte[], I don't remember which).
     Best regards,
     Robert

Similar Messages

  • Query is not showing the values - authentication error

    Hi,
    After running a query it is not showing the values and showing <b>"You do not have the authorization for the selected component."</b>
    Diagnosis
    You do not have the authorization for the selected component.
    System response
    The selected component cannot be edited.
    Procedure
    lease speak to the person responsible for authorization, if you require authorization for the editing of this component. The function is protected by the object "Business Explorer - components" with the following fields:
    InfoCube ZPLAYOPPT
    Type of a component REP
    Component PLAYBOOK_OPPT_1
    Activity 16
      Notification Number BRAIN 800 
    <b>Can u pls tell me the solution.</b>Thanks and Regards,
    Giri.

    Go to SU01, look at your authorization profile for which roles you are given. Then, go to PFCG and check out the roles and how they are defined. It is possible that you are not authorized to view application area, infocube, certain characteritics etc.
    Hope this helps,
    Regards,
    Petter

  • Why this query does not show the result?

    Why the query with the schema prefixed does not show the result and the query without schema display the correct results?
    SQL> select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS';
    select data_object_id,object_type from dba_objects where object_name='HR'.'JOBS'
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    SQL> select data_object_id,object_type from dba_objects where object_name='HR.JOBS';
    no rows selected
    SQL> select data_object_id, OWNER, object_type from dba_objects where object_name='JOBS';
    DATA_OBJECT_ID     OWNER                          OBJECT_TYPE
    69662              HR                                 TABLE
                       OE                                 SYNONYM
    SQL> SELECT USER FROM DUAL;
    USER
    SYS

    Hi,
    the column object_name refers to a object_name which is 'JOBS', the column owner refers to the owner 'HR', the value isn't stored together, so you have to select the two columns. It is the same behaviour as every other table/view. Have a look at the values in the view DBA_OBJECTS.
    Herald ten Dam
    Superconsult.nl

  • CHAR's value in the query but not in the report??

    Hi all,
    I loaded master data and crm transaction data from ODS to Cube. The data is in the cube but there is no value in my report when running it. EX: there are some CHARs in my report, I checked those CHARs have value in the query but it shows 'not assign' in my report when I run it. What happen?
    Thanks.
    J.

    Please see below text and also the sent link..
    If a navigation attribute is used in an aggregate, this aggregate has to be adjusted using a change run as soon as new values are loaded for the navigation attribute (when master data for the characteristic belonging to the navigation attribute is loaded.) This change run is usually one of the processes that are critical to the system performance of a production BW system. This is why, by avoiding using navigation attributes or not using navigation attributes in aggregates, you can improve the performance of this process. On the other hand, not using navigation attributes in aggregates can lead to poor query response times. The data modeler needs to find the right balance.
    http://help.sap.com/saphelp_nw04/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
    cheers,
    Vishvesh

  • Query is not using the INDEX

    I have issue with a query as follows. It is not using index when i keep a function on the left hand side of comparison in where condition.
    But when I remove the function it is using index.
    With BLC AS
    Name                                      Null?    Type
    ID                                        NOT NULL NUMBER
    MASTER_VALUE               NOT NULL NUMBER(8)
    DESC_TEXT_ID                                    NUMBER
    GVM                                                     VARCHAR2(50)
    MASTER_LOOKUP_ID    NOT NULL  NUMBER
    WORK_SECTION_ID                          NUMBER
    AUDIT_TRAIL_NO                              NUMBER
    SQL> SELECT COUNT(*) FROM BLC;
      COUNT(*)
          7769
    SQL> SELECT COUNT(DISTINCT(GVM)) "distinct" FROM BLC;
      distinct
          1350
    SQL> SELECT COUNT(*) "nulls" FROM BLC WHERE GVM IS NULL;
         nulls
          6419
    SQL> SELECT COLUMN_NAME,INDEX_NAME FROM DBA_IND_COLUMNS WHERE TABLE_NAME='BLC';
    COLUMN_NAME                              INDEX_NAME
    MASTER_LOOKUP_ID      LKPCDE_MSTLKP_FK_I
    WORK_SECTION_ID        LKPCDE_WRKSEC_FK_I
    GVM                                   LKPCDE_UK
    MASTER_VALUE              LKPCDE_MASTERID_VALUE_UK
    MASTER_LOOKUP_ID     LKPCDE_MASTERID_VALUE_UK
    ID                                       LKPCDE_PK
    SQL> EXPLAIN PLAN FOR SELECT ID FROM BLC WHERE UPPER ( GVM) = 'MAIN_ORG';
    Explained.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3196655606
    | Id  | Operation         | Name             | Rows  | Bytes | Cost (%CPU)| Time|
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT  |                  |    78 |   624 |    18   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| BLC |    78 |   624 |    18   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(UPPER("GVM")='MAIN_ORG')
    13 rows selected.
    SQL> EXPLAIN PLAN FOR SELECT ID FROM BLC WHERE GVM
      = 'MAIN_ORG';
    Explained.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1620245961
    | Id  | Operation                   | Name             | Rows  | Bytes | Cost (%
    CPU)| Time     |
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT            |                  |     1 |     8 |     2
    (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| BLC |     1 |     8 |     2
    (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN         | LKPCDE_UK        |     1 |       |     1
    (0)| 00:00:01 |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
       2 - access("GVM"='MAIN_ORG')
    14 rows selected.
    SQL> EXPLAIN PLAN FOR SELECT /* INDEX(LKPCDE_UK) */ ID FROM BLC WHE
    RE UPPER ( GVM ) = 'MAIN_ORG';
    Explained.
    SQL> SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3196655606
    | Id  | Operation         | Name             | Rows  | Bytes | Cost (%CPU)| Time
         |
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT  |                  |    78 |   624 |    18   (0)| 00:0
    0:01 |
    |*  1 |  TABLE ACCESS FULL| BLC |    78 |   624 |    18   (0)| 00:0
    0:01 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
       1 - filter(UPPER("GVM")='MAIN_ORG')
    13 rows selected.
    Please let me know how i can force to use an index as it is causing CPU usage.
    I can not change the query in application as it is used at many places.
    Thanks

    Hi,
    Version is
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
    Thanks

  • Query is not using the cache

    We are on 7.3 and I have been doing some performance tuning.  I've noticed that even though a query is in the query aggregate in the cache monitor when I run it for the 1st time every morning it does not use the cache.  I traced it from ST05 and verified this.   However when I  run it the second time during the day it uses the cache.  The query cache mode is set to 5.  do you know why it does this?  I am using the exact same parameters when I run the query every time.

    You need to use following process of process chain: "Attribute change run (ATTRIBCHAN)". This process needs to be incorporated into your process chains which loads data into provider on top of which your query is based.
    See following links on topic how to build it:
    https://help.sap.com/saphelp_nw73/helpdata/en/4a/5da82c7df51cece10000000a42189b/frameset.htm
    https://help.sap.com/saphelp_nw70ehp1/helpdata/en/9a/33853bbc188f2be10000000a114084/content.htm
    cheers
    m./

  • Portal Report from SQL query will not fill the page irrespective of column width.....

    I'm displaying a report in a portal and if you run in full screen the table does not fill the page.
    I can change the column width from xx percent to xx pixel and nothing makes a difference
    any ideas?

    Hi,
    Which version of portal are you using. This is a bug. It has been fixed in 30984.
    Thanks,
    Sharmila

  • Query does not retrieves the correct values

    Hi,
    pls look into the code.
    clear: wf_etenr,
             vbep.
    To get the Scheduled Loading date and Scheduled Arrival Date.
        SELECT MAX( etenr ) FROM  vbep INTO wf_etenr
                            WHERE vbeln = tvbdpl-vgbel
                            AND   posnr = wl_posnr.
        IF sy-subrc EQ 0.
          clear vbep.
          SELECT SINGLE * FROM vbep         "R02
                 WHERE vbeln = tvbdpl-vgbel "R02
                  AND posnr = tvbdpl-vgpos  "R02
                  AND etenr = wf_etenr.
          IF sy-subrc EQ 0.
    when i see the values at dictionary level using the same wher conditions are mismatching with the query excution result in the program.
    here in the second query ( SELECT SINGLE * ) it giving the wrong results .
    if i compare the results at table level ,some of the field values are missing after excuting the above second query.
    pls can any one give me ur suggestion on this !
    rgds
    sanjay reddy

    Hi,
    are these the same?
    wl_posnr and tvbdpl-vgpos
    try
    SELECT SINGLE * FROM vbep
    WHERE vbeln = tvbdpl-vgbel
    AND posnr = wl_posnr
    AND etenr = wf_etenr.
    IF sy-subrc EQ 0.
    to make somewhat consistent querys.
    regards
    Message was edited by: Zlatko
            Zlatko Stracenski

  • Query is not picking the data from multiprovider

    Hi All,
    i have defined a query on a multiprovider which is made up of three ods one from sales orders, delivery, and billing but when i run the query ...its not picking up order quantity for some sales orders and also its not picking all the items available for that orders...but for some orders its picking up the order quantity but not delivery quantity...
    order quantity is coming from sales orders ods and delivery quantity is coming form delivery ods, billing quantity is coming from billing ods...can somebody help me with a suggestion like what could be ther problem...
    any sugestions will be highly appreciated.
    with regards
    harish

    dear Harish,
    multiprovider works as union,
    you have order, delivery, billing, e.g the data like
    order
    orderno orditem customer product ordqty
    ORD001  1       a        x        10
    ORD001  2       a        y        20
    ORD002  1       b        x        30
    delivery
    delvno delvitem customer product delvqty
    DLV001  1       a        x        8
    DLV002  1       b        x        25
    billing
    billno billitem customer product billqty
    BIL001  1       a        x        8
    multiprovider
    orderno-orditem-delvno-delvitem-billno-billitem-customer- product-ordqty-delvqty-billqty
    ORD001  1   blank blank blank blank    a        x        10 blank blank
    ORD001  2   blank blank blank blank     a        y        20 blank blank
    ORD002  1   blank blank blank blank    b        x        30 blank blank
    blank blank DLV001  1 blank blank      a        x        8
    blank blank DLV002  1 blank blank      b        x        blank 25 blank
    blank blank blank blank BIL001  1       a        x        blank blank 8
    what can you do is remove order no, order item, delivery no, delivery item, billing no, and billing item from query row area.
    hope this helps.

  • Lock Object (Not locking the table)

    Hi Guys
    I have a custom table ZDRAD same like standard table DRAD with an additional 'DATE' field . ZDRAD's Key fields are same like DRAD . I have created a lock object 'EZDRAD' where I put name = 'ZDRAD' (Custom table) and mode = 'EXCLUSIVE CUMULATIVE' . Now I want to lock the table(Whole table) before modifying/Inserting/deleting the records in se38. Please check the code below and suggest me if I am passing wrong values to the lock object Function module.
    Code
    TABLES : ZDRAD.
    CALL FUNCTION 'ENQUEUE_EZDRAD'
    EXPORTING
       MODE_ZDRAD           = 'E'
       MANDT                = SY-MANDT
       DOKAR                = ' '
       DOKNR                = ' '
       DOKVR                = ' '
       DOKTL                = ' '
       DOKOB                = ' '
       OBZAE                = 0
       OBJKY                = ' '
       X_DOKAR              = ' '
       X_DOKNR              = ' '
       X_DOKVR              = ' '
       X_DOKTL              = ' '
       X_DOKOB              = ' '
       X_OBZAE              = ' '
       X_OBJKY              = ' '
       _SCOPE               = '2'
       _WAIT                = 'X'
       _COLLECT             = ' '
    EXCEPTIONS
       FOREIGN_LOCK         = 1
       SYSTEM_FAILURE       = 2
       OTHERS               = 3
    *IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    IF SY-SUBRC = 0.
    ZDRAD table is locked.
        P_L_LOCK_STAT = 'X'.
        EXIT.
      ELSE.
    ZDRAD table is not locked
        CLEAR P_L_LOCK_STAT .
      ENDIF.

    Hi Kanthimathi
    That is numeric field . Please suggest me how can i check the lock.

  • Variables defined in Query designer not affecting the web template

    Hello,
    I have some variables defined in a query, through Bex query  designer.
    The selection screen to enter the values for the variables pops up when excuted on the web or in excel .
    But the variable selection screen does not pop up when i execute a web template where in i defined with the same query.
    Please suggest me why it is happening so..

    In WAD check in the General Properties whether you have unchecked the Force Variable Screen On Checkbox
    Other thing to check is whether you have personalized the selection screen??? After Executing the Report go to selection screen by clicking on the Variable Screen option. To the left side of each variable you can see the personalization icon. right click on that and select delete personalization.
    Hope this helps.

  • Update to power query does not refresh the pivot table

    Hello all,
    whenever i make a change to power query dataset and do a refresh, the data will not be refreshed on the pivot table build on the power query dataset.
    Is there anything which i missed while updating the powerquery?
    Thanks
    Satya

    I have created the Powerquery dataset and loaded it into Data model. Then i have created the pivot table using the external connection.
    After making changes to dataset and then loaded the dataset to Data model. After these changes, once I click on the refresh pivot table or refresh all from data tab nothing changes on the pivot tables.
    Thanks
    Satya

  • Workbook with changed query does not display the changes...

    Hi,
    I have a problem with a workbook with one query in - the query has been changed, but the new added keyfigures are not displayed in the existing WB.
    I know from Bex 3.5 there is the option on WB settings "return to global definitions" - I miss this functionality in BI 7.0.
    My installed sap gui is version 710
    Please let me know where I can switch on this feature...
    regards
    chris

    If you use "Return to Global Definition on refresh" option, all the users would have to have it turned on in their workbooks. In that case won't they lose any settings/navigation the user did, specific to their need. All the workbooks end up being the same in that case.
    We are still running on 30B and starting the upgrade to BI70. We just went through training on the new BEx analyzer, and I have to agree with you that some of the useful features of BEx 3X will be missed. Specially in the area of Workbook support, things like Copy query, insert query etc are missing as well.
    Thanks
    Vineet

  • Results in the query are not like the one in the cube

    Hello there,
    I have a problem. when I execute a query, and see the results, it doesn't match. The query calculates some things. I have a sort of formula, when I execute it on database level I get a other result and when I execute on query level I get other results. The problem is that the wrong results that I get, is for a couple of days. only couple of days are wrong. Where should I search because I don't know it anymore.

    Hi
    Check the data of your cube from LISTCUBE TCode. And then apply the formula (what you have applied at the query level) on the Cube data.
    And then compare the data if it is matching.
    And if you find that data in Cube is wrong then you will have to hig in to its source data.
    Regards
    Rohini

  • Query does not display the code.

    Hi Experts,
    I created a query joining SKA1 and SKB1 with the following requirements:
    Query of the chart of accounts total for each company code with the following additional information:
    - reconciliation list: yes or no / for which sub-ledger (cutomer, accounts payable, assets or others)
    - binding on interim transaction: yes or no.
    I have successfully created a query but instead of displaying the code (for example AA01-company code) the name of the company was displayed.(example: ABS Company) this is also the same with other fields like the GL account, instead of displaying the numerical value, the text description was displayed even if I have selected the correct field assignment (SKB1-BUKRS).
    Your inputs are very much appreciated. thanks in advance!

    Hi,
    Are you creating this query under SQVI TCode?
    Because when i am doing the same thing... its working. i can see he company code coming up as AA01.
    SKB1-BUKRS is for Company code number... then how it can display Company code Description.
    Best Regards
    Guneetinder

Maybe you are looking for

  • Y do I only have the option to mute my apps or to keep my screen from rotating

    Why do I only have the option to mute my iPad or to keep my screen rotation locked? I want it the way it was when I was able to her everything n have my screen rotate plz give me a solution if there is one appreciate it

  • Triggered aquisition for determined time

    I am using a PCI-6371 to trigger a continuous AI aquisition on 8 channels of a NI-4472 at 15 ks/s, while displaying and writing the data to a file. I am currently using the get date/time in seconds function to determine when to exit the loop, but the

  • Burning iTunes

    How can I burn a audio book (download from iTunes-Store) on CDs, wich is longer than the maximum capacity of a CD? Can I split up this long part in several parts in iTunes and than bruning this parts at several CDs? I'll listen this audio book in my

  • Video conf/chat

    I have a Irulu tablet 4.4 kitkat.  Can I use Skype to video between tablet and desktop. thanks Mike

  • Simple Task, Weird Result, I'm confused

    I know there's a simple answer to this, but it has eluded me for over a day now. Take a look at the code I've included. The first block uses an AS grahpics object to draw a filled rectangle (16x16 pixels). Then the second block attemps to "cut" the t