Best way to query cache - get() vs filters?

Hi,
I am in a dillemma. Whether to use NamedCache.get() or entrySet(filter) methods to query the cache. Please guide me..
My understanding is that when using
1. get() or getAll(), Coherence checks whether the entry is in the cache, if it does exist in the cache, Coherence get its from the DataStore
2. entrySet(Filters), Coherence just checks the cache and returns results based on whats available in the cache.
In that case, Isnt it better to use get instead of entrySet in a case where one is not sure whether up to date data is available in the Cache?
1. What is the difference between using a get and using entrySet ?
2. How does one make sure that up to date data is available in the cache when not using a write-behind scenario?
I am newbie...Gurus, please guide me..

sjohn wrote:
Hi,
I am in a dillemma. Whether to use NamedCache.get() or entrySet(filter) methods to query the cache. Please guide me..
My understanding is that when using
1. get() or getAll(), Coherence checks whether the entry is in the cache, if it does exist in the cache, Coherence get its from the DataStoreThat's not the relevant part.
In this case because you specified the keys to the entries, Coherence knows exactly where each entry resides, and optimally communicates with the owner nodes (1 network call / owner node) to get the data, and it will return the data without deserialization on the owner node.
2. entrySet(Filters), Coherence just checks the cache and returns results based on whats available in the cache.
In this case, depending on the actual filter (hierarchy) Coherence has to contact all nodes (if you did not filter it with KeyAssociatedFilter or PartitionFilter), which is not scalable, then depending on the filter(s) used it may have to deserialize possibly all cached entries (which is expensive) to evaluate the filter. On the other hand this method is usable for non-key-based access, which the get/getAll is not able to do.
In that case, Isnt it better to use get instead of entrySet in a case where one is not sure whether up to date data is available in the Cache?
1. What is the difference between using a get and using entrySet ?Heaven and earth...
2. How does one make sure that up to date data is available in the cache when not using a write-behind scenario?
You have to preload it, or trigger fetching it from a cache-store.
Best regards,
Robert

Similar Messages

  • What is the best way to query planned orders or work orders for make items and identify the buy component that is short for supply and vice versa?

    What is the best way to query planned orders or work orders for make items and identify the buy component that is short for supply and vice versa?

    What is the best way to query planned orders or work orders for make items and identify the buy component that is short for supply and vice versa?

  • What is the best way to go about getting a wireless connection on the go?

    Im new to the aple product. I just recently bought a New Macbook Pro and wanted to know what is the best way to go about connecting to the internet while not at home and on the go. I was thinking of maybe a USB internet stick. But dont know who provides them and who would be the best choose to go with for a nice price every month. If that was the best choose in the first place. Im living in the U.S.A so if you could help ill really apprecaite it. THANKS

    Hi! I'm writing in beginning of October so I don't know if you've found a solution.
    Your MacBook Pro probably has a WiFi card built in. You don't need to have a USB connector.
    Turn on AirPort, go to Network and choose the network that is available to you. It might ask for a password, so get it from the cashier. My MBP connects wherever I go, as long as there is a network available.
    Good luck.
    RS

  • What is the best way to Query for a PXI Chassis in TestStand

    Hi All,
    I have some benches that have a PXI Chassis and others without. 
    I would like to Query for the Chassis and if it isn't there I will use another method of testing.
    Is there a way to query for the chassis and if there is how?
    Thanks
    Message Edited by glennjammin on 10-09-2009 09:23 AM
    Test Engineer
    L-3 Communications
    Solved!
    Go to Solution.

    Hi,
    You could use the VISA Find Resource function. If you get back PXI[bus]::device[::function][::INSTR] or PXI[interface]::[bus-]device[.function][::INSTR] then you have a PXI chassis
    regards
    Ray Farmer
    Regards
    Ray Farmer

  • What is best way to report problems, get questions answered?

    If we have questions, or think we've found a problem, what is the best way to communicate with Oracle?
    - This forum?
    - TARs using our beta CSI number?
    - emails to [email protected]?
    - smoke signals?
    Regards,
    Steve Locke

    Hi Steve,
    For questions of a general nature (how do I...) this forum is best.
    If you have encountered a specific problem with a reproducible testcase (functionality not working, problems installing) then please work with support to log a TAR. This way a bug can be logged and tracked by the dev team.
    -Alvin

  • Best way to query extended events file in sql server 2012

    Hello all,
    is there any best way to xquery extended events async file i am having hard time sorting  out data in GUI and using xquery.
    Any help highly appreciated.
    thanks,
    ashwin.

    Yes, there might be better way to write it the way you did it. But since I don't know what you wrote or what you are looking for I can't give any advice. You need to be more specific.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Best way to query data with varchar (max) cloumn.

    Hi,
    I have joined  three table and selected 15colmuns over a period of 6months it tooks 10sec .
    I selected two more columns with varchar(max) datatype it took me 60sec.
    whats the best way to select varchar(max) over a period?
    Can anyone please help me on this?
    Thanks,

    I have joined  three table and selected 15colmuns over a period of 6months it tooks 10sec .
    I selected two more columns with varchar(max) datatype it took me 60sec.
    That appears to be normal behavior for any RDBMS.
    You can use the LEFT function to limit transmission volume from server to client:
    SELECT A.Title, A.DocumentSummary INTO tempdb.dbo.DocText
    FROM Production.Document A
    CROSS JOIN Production.Document B CROSS JOIN Production.Document C
    CROSS JOIN Production.Document D CROSS JOIN Production.Document E;
    -- (59049 row(s) affected)
    SET STATISTICS TIME ON
    DBCC DROPCLEANBUFFERS
    SELECT A.Title, A.DocumentSummary FROM tempdb.dbo.DocText A
    DBCC DROPCLEANBUFFERS
    SELECT A.Title, Prefix=LEFT(A.DocumentSummary,10) FROM tempdb.dbo.DocText A
    SET STATISTICS TIME OFF
    SQL Server Execution Times:
    CPU time = 172 ms, elapsed time = 787 ms.
    DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    (59049 row(s) affected)
    SQL Server Execution Times:
    CPU time = 62 ms, elapsed time = 560 ms.s.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Best way to query

    Hello All,
        I have a scenario.
    I read a DB table MARA, i will get few records .
    now i have to query a Z* table, based on the mara entries, what i got earlier.
    but in Z* table contains the material, with two extra characters than mara-matnr.
    for eg: if mara-matnr = 12345
             Z*-matnr can be 1234500 or/and 12345AB like this.......
    I know i can loop through mara entries and select Z* for each of mara entry using like statement.
    is there any other better way.
    I cant use 'for all entries' with 'like'  it is giving  a sytax error saying this combination cant be used.
    Thanks in advance.
    Best Regards
    Amrender Reddy B

    Hi,
    1) Declare 3 tables and corresponding WA of type of your Z*table say suppose gt_table1,gt_table2 and gt_table3
    2) Do a select on Z*table and get all the data in table gt_table1. 
        Loop at gt_table1 into wa_table1.
          wa_tbale2 = wa_tbale1.
          wa_table2-matnr = wa_table-matnr+(5).  << if MATNR is 12345AB then it will take only 12345
                                                 << this logic will only work when MATNR lenght is constant
         append wa_table2 to gt_table2.
        Endloop.
    Then,
    Loop at gt_table2 into wa_table2.
       Read table gt_mara with key wa_mara-matnr = wa_table2-matnr.
        if sy-subrc ne 0.
           wa_table3 = wa_table2.  <<u can delete entries here but it can give some performance problm
       endif.
    Endloop. 
    delete gt_table2 from gt_table3.
    This way u will get the required records in gt_table2.
    Regards,
    Mukesh.

  • Best way to query on a non-table item?

    Hi,
    I have a form that has customer_name (non-table item) and customer_id (table item). Customer_id is not visible to the user. We need to be able to query on the customer_name. I have tried using the pre-query trigger but I get an error ORA-01422. Any suggestions would be appreciated. I am a non-technical person, so the simpler, the better.
    Thanks in advance.
    Trish

    Hi ,
    I know two alternatives:
    1) Use the POST-QUERY trigger not the PRE-QUERY... But, you would have the same problem because i think that the customer_id column is not unique. So you should select a combination of columns which guarantee the uniqueness of the selected column...
    2)Other design. Read the doc at :
    http://www.oracle.com/technology/products/forms/pdf/BlockOnAJoin.pdf
    Using this way you should not use the trigger POST-QUERY....
    Regards,
    Simon

  • What is the best way to query for the roles of a 2013 Lync server?

    I am new to Lync.
    I am not able to find, but if anyone already asked and got answers in this forum, or documentation I will be much appreciate. 
    I would like to programmatically ( powershell wmi most likely)
    Get-WmiObject –query ‘select * from win32_product’ | where {$_.name –ilike “*Lync*”}
    Typically returns a lot of installed components, is there a way to tell whether a lync ( 2013) installation and deployment is either a Front/Back, or Edge or Mediation?
    Thanks

    thanks. Although I was expecting  (hoping) to be able to query for roles like : Front/Back, Edge , Mediation, Director and etc.
    PS C:\Users\labuser> get-csservice | select PoolFqdn,Role,SiteId
    PoolFqdn                   Role                       SiteId
    lab-lync2013-01.lab.exc13  UserServer                 Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  Registrar                  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  UserDatabase               Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  FileStore                  Site:lab-lync2013-01
    LAB-EXCH2013CAS            WacServer                  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  WebServer                  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  ConferencingServer         Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  MediationServer            Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  ApplicationServer          Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  ApplicationDatabase        Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  CentralManagement          Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  CentralManagementDatabase  Site:lab-lync2013-01
    lab-lync2013-01.lab.exc13  MonitoringDatabase         Site:lab-lync2013-01
    10.199.4.4                 PstnGateway                Site:lab-lync2013-01
    What if, I use get-counter instead?
    E.g. if I am able to get something returned for 
    \LS:A/V Edge - UDP Counters(_Total)\A/V Edge - Packets Dropped/sec  , then I know it has Edge role
    \LS:MediationServer then it has Mediation role
    But then I really cannot tell for sure for FF or just Standard Editor Server.
    It is the list of server roles described in here that I am interested in. I understand Lync is very flexible in terms of deployment roles.
    http://technet.microsoft.com/en-us/library/gg398536.aspx
    Thanks
    Ben

  • Best way to query sap tables

    hi everyone. i am new to data services, so here we go. we are using an sql2005 server for our end data repository. i am trying to create a temp table of sap po data. i have split the queries up so that query 1 is 2 sap tables, query 2 pulls in another sap table, etc. so that i only have one sap table, other then the first query, being queried at a time. it takes a really long time - i end up killing the job. is there a better way to pull sap data?
    thanks - sandra.

    Try here:-
    http://wiki.sdn.sap.com/wiki/display/BOBJ/SAP
    This is an incredibly useful set of pages.

  • Best way to query SQLite db in mobile app

    I have created a mobile app with a directory screen.  I'd like to query and display records from a SQLite DB and my question is what is the best method for doing that? I've created a SQL db with dummy records via SQLite Manager and I want to create a screen/article in Indesign that queries that DB and displays the resulting records.

    When you say access for later, do you mean between application launches or at runtime?  If you want to persist sometihng between launches, you can use the persistenceManager object on the application.  This object allows you to save and retrieve key-value pairs.  If you want to do this at runtime, I would suggest just having some sort of service or object (such as an ArrayCollection) in the global scope so that you can easily retrieve the information as necessary.
    When pushing on a new view, you can pass data to the new view using the pushView api.  This allows you to send some identifier or data object for a specific card to the next view so that i can properly display it.  For example:
    navigator.pushView(CardView, cardData);
    The new CardView will have the cardData object you sent set to its data property.  See http://opensource.adobe.com/wiki/display/flexsdk/View+and+ViewNavigator for more information.
    Chiedo

  • Best way to schedule and get notification for plsql job

    hi
    i would like to execute a procedure on weekly basis and want to be notified if the job fails
    which is correct way of doing this?
    1. create user defined metric and call the procedure this way
    2. create scheduler job dbms_scheduler
    the other question is while I have exception handling within plsql procedure, how will the grid agent or dbms_scheduler distinguish between success and failure ?
    do I have to set a variable or execute special command as part of exception handling ?

    Have you researched the ADD_JOB_EMAIL_NOTIFICATION procedure of DBMS_SCHEDULER?
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_sched.htm#BABBFBGI
    This procedure adds e-mail notifications for a job. E-mails are then sent to the specified list of recipients whenever any of the specified job state events is raised.For more information about monitoring jobs, including a description of job logs and job email notifications, look here:
    http://docs.oracle.com/cd/E14072_01/server.112/e10595/scheduse008.htm
    You can configure a job to send e-mail notifications when it changes state. The job state events for which e-mails can be sent are listed in Table 28-13. E-mail notifications can be sent to multiple recipients, and can be triggered by any event in a list of job state events that you specify. You can also provide a filter condition, and only job state events that match the filter condition generate notifications. You can include variables like job owner, job name, event type, error code, and error message in both the subject and body of the message. The Scheduler automatically sets values for these variables before sending the e-mail notification.

  • Hello, Last night my phone was stolen from the staff of the restaraunt i was eating  at and wanted to know what is the best way to get my phone back? Or can you give me other options, please?

    Hello, last night my phone was stolen from the staff of the restaurant i was eating at and wanted to know what is the best way of going about getting my phone back or do i have other options for a new Iphone, thank you very much.

    Click here for information; you can also contact the restaurant.
    Apple won't give you a discount on a new one, but your insurer or wireless carrier might.
    (126630)

  • What is the best way to implement Carousel i.e. web part in a site page on office 365 site?

    We can implement the Carousel web part in many ways like content By Query Web Part , jquery (nivo) plugin or content search web part etc. But among these which one is the best way to implement to get best performance of the page?
    Thanks

    content search web part always provides best performance because it uses the search. only consideration you need to take is, it does not display the changes immediately and you need to wait for the incremental crawl to happen.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

Maybe you are looking for

  • [Solved again] Updated to linux-3.10.8; Can no longer boot

    Hey everyone. So, linux-3.10.2-1 just dropped to the [testing] repos, and I got it through a standard -Syu. Along with it were upgraded libxfont, linux-headers, lirc-utils (and I installed extundelete during the same command). Here's the relevant bit

  • My hard drive will not eject or allow me to do anything to it

    Yesterday I got an old hard drive from 2007 working and began to transfer the files to a new hard drive.  About mid way through the transfer there was an error and the new hard drive ejected itself.  When I turned it on again it shows up but does not

  • How to airplay the iPad's screen to Apple TV?

    I am using the 1st Generation of iPad. And I have an Apple TV. I can only stream Videos, Photos or Music to the Apple TV only! What should I do to airplay the iPad's screen to Apple TV? Thanks a lot!

  • Solaris 10 x86 Dell Vostro--USB Keyboard occasionally hangs

    and needs to be unplugged and re-plugged in. It then starts responding again. Any help would be appreciated, thanks.

  • Service registration 11gr2 RAC AIX

    Hi Gurus, I have created an database service called "MTRXUATR" with srvctl as both nodes as prefered as show below ,this service got registered on both nodes (mvx20b) but only instance 1 is providing the service and not by the other instance .where l