Caching Projection Queries

Does Kodo cache projection queries? All my queries are caching properly,
except for ones that use setResult(), and I'd like them to be cached also.
Here's an example:
PersistenceManager pm = getPM();
extent = pm.getExtent(ConstellationRevenueDAO.class, false);
query = (KodoQuery) pm.newQuery(extent);
query.setResult("max(billingDate)");
date = (Date) query.execute();
The corresponding log entries show a cache miss every time. I've noticed
that when the kodo.datacache.QueryKey has a "cacheable:false", it won't be
cached:
2004-12-10 16:04:49,160 DEBUG [kodo.DataCache] Query cache miss while
looking up key "kodo.datacache.QueryKey@dafa335b[filter:[null],access
path:null,subs:false,ordering:null,ignoreCache:false,startIndex:0,endIndex:0,timeout:-1,cacheable:false]".
2004-12-10 16:04:49,160 DEBUG [kodo.Query] executing query: select
max(billingDate) from
com.stercomm.slp.biztier.persistence.stg.ConstellationRevenueDAO exclude
subclasses
2004-12-10 16:04:49,441 DEBUG [kodo.jdbc.SQL] <t 14300405, conn 30092753>
[281 ms] executing prepstmnt 2954511 SELECT MAX(t0.BES1_BILLINGDATE) FROM
DMMK01.CONSTELLATIONREVENUE t0
2004-12-10 16:04:49,441 DEBUG [kodo.jdbc.JDBC] <t 14300405, conn 30092753>
[0 ms] close
2004-12-10 16:04:59,316 DEBUG [kodo.DataCache] Query cache miss while
looking up key "kodo.datacache.QueryKey@dafa335b[filter:[null],access
path:null,subs:false,ordering:null,ignoreCache:false,startIndex:0,endIndex:0,timeout:-1,cacheable:false]".
2004-12-10 16:04:59,316 DEBUG [kodo.Query] executing query: select
max(billingDate) from
com.stercomm.slp.biztier.persistence.stg.ConstellationRevenueDAO exclude
subclasses
2004-12-10 16:04:59,597 DEBUG [kodo.jdbc.SQL] <t 14300405, conn 723185>
[281 ms] executing prepstmnt 7871956 SELECT MAX(t0.BES1_BILLINGDATE) FROM
DMMK01.CONSTELLATIONREVENUE t0
2004-12-10 16:04:59,613 DEBUG [kodo.jdbc.JDBC] <t 14300405, conn 723185>
[0 ms] close

Eric-
Unfortunately, queries that use aggregates, projections, or any
custom result class are not cached. The next version of Kodo
will mention this behavior in the documentation.
In article <cpd3dv$m12$[email protected]>, Eric Long wrote:
Does Kodo cache projection queries? All my queries are caching properly,
except for ones that use setResult(), and I'd like them to be cached also.--
Marc Prud'hommeaux
SolarMetric Inc.

Similar Messages

  • Caching Database Queries

    Hello,
    I've tried to find out information on how to go about doing this, but I can't find a good example or discussion to direct me in the right direction.
    I want to cache a query so that I can generate a report, as well as have a utility class generate a .csv file so the report can be saved for later use. Now I want to be able to have both of these run one after the other, but I don't want to run the same quries twice since it's a big report.
    Now, should I store the ResultSets in a bean? How do I cache the queries? If it's alright, I would love to see an example.
    Thank you very much,
    Lior

    It really looks like a expensive query. Depend on how big is your output, you could store it, as suggested by Jay, 1) in a session or application scoped bean, or 2) if output is too big to store in memory, store it in a tmp table in database by insertion (then the next retrieval will be a simple select statement to that tmp table), or store in HD file(s)(That's probably the purpose of the .csv file you said. If so, this method looks very clumsy.).
    My choice would be 2). I will use your main query to generate data to populate a tmp table. Then query the tmp table twice to fetch the data.
    This way you can save query time, because you only use the main query once. And you utilize whatever code/tool you already have for data processing.

  • Customer Project queries

    Hi,
    1. Do we have to manually assign all costs to sales order items? Even though the Sales Order Items are linked to Project Tasks, some costs do not get automatically assigned to the sales order items. What is the impact of not manually assigning these tasks? We plan to use Cost to Cost Project POC for revenue recognition.
    2. For Cost to Cost POC, how do I assign 'Planned Costs' to Sales Order Items? I do not see an option to do so.
    3. Is it easier to just use Cost to Cost Project POC and let project managers manage the forecast budget in the Project Management WoC? Or do they have to actively manage project cost forecasts at the Sales Order WoC? What is best practice?
    4. It is possible to print multiple invoices from the system at once? For example, how do we print all outstanding invoices for a particular customer at once? It appears we have to manually select individual invoices and go to Ouput History to print invoices. Surely there must be an easier way?
    Thanks

    Hello Raman
    Kindly find the answers related to Revenue Recongition Queries:
    1. You don't need to manually assign costs to the Sales Order Items. When you link the sales order item to the Project header or a Project Task, system will automatically create the assignment rules.Then all the expenses assigned to the Project Header or Project Task will be automatically assigned to the Linked sales order item. However if you have assigned the Project Task in the Sales Order Item and you record your expenses against the Project header, then system won't be able find the linked Sales Order Item.Hence cost will be assigned.You can manully maintain rules for such cases and click on Apply Assignement Rules to determine the sales order item for all the unassigned Expense items.
    2. For the Product -delivery-based Items,cost will be picked from valuation tab of the product master data.
    For project based items, the assumption is that the cost Calculation is done by the project lead and entered in Sales order manually in the Pricing and Invoicing tab.
    Thanks
    Parveen Kumar

  • Cache on Queries : relation to selections

    I've got a pretty basic question on the usage of the Cache for query results: is it mandatory that the restrictions on a query are 100% the same in order to benefit from a already cached run?
    Let me illustrate with an example:
    Let's say at 10:00 user A runs a query with a restiction on customer A and fiscal period 01.2004-12.2004. This execution of the query caches the data.
    Then at 10:10 user B runs the same query with a restriction on customer A (the same as for the cached run) but with a <b>smaller</b> restriction on fiscal period (only 01.2004-06.2004).
    Does this 2nd run at at 10:10 use the cached data (since it is a subset of the data already in the cache) or do the restrictions need to be 100% the same?
    I think i know the answer, but i wanted to run this by some experts...
    Tnx in advance for the feedback

    You're getting to the heart of OLAP Caching here.  The answer can not be determined by what you have provided.
    First - the order of the variable prompts has no impact.
    As for whether the cache is used - the answer is ....
    it all depends.  It depends on if the variables you use have the 'Can be changed during navigation' option checked.  This is the determinant and unfortunately, I don't think SAP has really made that clear/obvious.
    If your variables do NOT have that option set, then the variable values must match 100% for a second execution of the query to use the cache.
    If your variables are set to 'Can be changed...' , then queries that reference a subset of a previous query execution results will use global cache.
    This assumes you have global cache turned on the appl server, and on for the infoprovider or the query.
    The use of Reporting Agent allows you to schedule a query execution as soon as the data is available, presumably off hours, so that all/most executions of the query  during the day use cache.  There's more to this whole topic, having to do with if your cache is on a specific app server or shared across all app servers, and the Read options, etc, that can come into play as well.  If you look at the contents table RSDDSTAT using SE16, you can see if a particular execution used cache, as there will be 0 DB selects shown.  RSRCACHE can also provide some insight as well.

  • Hard Drive Setup for Source Files, Media Cache, Project, Render, etc...

    I am working to set up the following drives:
    C: SSD for OS and Programs
    D: RAID 0 (Three SATA II F3's) for Premiere Projects, where I render too, and Encore Projects
    E: RAID 0 (Two SATA III WD Caviar Blacks) for Source Files, media cache, and preview files (if i can get the Marvel controllers/SATA III to RAID that is)
    External HD USB 3.0 for backing up projects
    Should I be doing this different?
    Does anyone think it would be better to use SDD drive(s) instead of HDDs? I

    We're almost there Harm, thanks! I'm about to indicate this as being "Answered"
    More explicitly, are you suggesting it would look like this?
    C: SSD for:
    OS and Programs
    D: RAID 0 (Three SATA II F3's) for:
    Premiere Project
    Where I render project too
    Encore Project
    Source Files (Per Harm's suggestion)
    E:  RAID 0 (Two SATA III WD Caviar Blacks) for:
    Media cache
    Preview files
    Pagefile
    Is two RAIDs more ideal? That is (provided the above configuration is correct); does the pagefile, media cache, and preview files need to be on a RAID?
    Should I partition a piece of my E and use that for the pagefile or pagefile, media cache, and preview files? If yes, which? and how much of a partition should I create?
    When setting the pagefile, should I set all the other drives to "none" (except the E of course)?
    Lastly, regarding my E: drive for media cache, preview files, and pagefile (assuming all this is supposed to be on a different drive). Would I be better off using an SSD for that? Or should I keep my E: drive HDD with RAID 0? I suppose it will depend on what's more important, read or write speed. If read speed is more important than I can get an SSD for under $200 that will be really fast reads. If it's about writing then my WD's in a RAID will be better. So, which is more important for these things, writing speed or reading speed? If the SSD would be a solution for the extra files then I’ll have this set up:
    C: SSD for:
    OS and Programs
    D: RAID 0 (Three SATA II F3's) for:
    Premiere Project
    Where I render project too
    Encore Project
    Source Files (Per Harm's suggestion)
    E:  SSD for:
    Media cache
    Preview files
    Pagefile
    F:  One SATA III WD Caviar Black for:
    Extra Backups and stuff
    Thanks Harm, I'm about to have an unprecedented editing experience I think! Finally, after more than 7 years!

  • Adobe Captivate Cached Projects

    I've never done anything with this file and wondered what would happen if I deleted its contents?

    Hi Susan,
    Have a look at this thread in the new forum, where a similar question popped up:
    http://captivate.adobe.com/captivate/topics/adobe_captivate_cached_projects_folder
    You can safely delete the contents, but I recommend to use the AIR application (link is in the thread, provided by Vish) where you can select which caches can be deleted. For recent files I will mostly keep the cache, because it can be a saver if even the backup (hope you activated the backup functionality) gets corrupted. Moreover, as Vish points out, project will start quicker if cache is there.
    Lilybiri

  • Oracle 9i rac cache fusion queries

    Hi RAC experts,
    Would like to understand more on the background of cache fusion.
    Kindly advise on the following cache fusion operation as i'm having some confusion.
    1. read/read - user on node 1 wants to read a block that user on node 2 has recently read.
    in this case, the block is already on the cache of node 2 since it is recently read. so does node 1 read from disk to store in it's down cache since the info is not in it's cache? or it can request directly from the remote cache in node 2 to do shipping of the block to it's own cache for select?
    2. read/write - user on node 1 want to read a block that user on node 2 has recently updated.
    in this case, node one will get the recently updated info from remote cache(node 2) to it's local cache for update right?
    3) write/read - user on node 1 want to update a block that user on node 2 has recently read.
    does node 1 read from disk since the info is not in it's cache? or it can request directly from the remote cache in node 2 to do shipping of the block to it's own cache for update?
    thanks
    junior dba

    1. read/read - user on node 1 wants to read a block that user on node 2 has recently read.Since the block is in another instance's buffer cache, the questing instance(1 in your case) will request the block to be shipped from node 2. It will avoid going to disk.
    .2. read/write - user on node 1 want to read a block that user on node 2 has recently updated.in this case, node one will get the recently updated info from remote cache(node 2) to it's local cache for update right?
    That's correct.
    oes node 1 read from disk since the info is not in it's cache? or it can request directly from the remote cache in node 2 to do shipping of the block to it's own cache for update?Same as in 1) above, it gets from the other's instance.
    These concepts have been explained well in RAC Handbook by K Gopalakrishnan. Here is the additional information on the book. http://www.amazon.com/Database-Application-Clusters-Handbook-Osborne/dp/007146509X/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1211888392&sr=8-1
    HTH
    Thanks
    -Chandra

  • You cannot use a remote location as a project cache folder.

    I keep getting this message when trying to enable SCORM in my project, how do I publish?
    You cannot use a remote location as a project cache folder. Please enter a valid location to continue.
    Any ideas are appreciated!!!

    Hi there,
    Can you check edit > preferences > general settings.
    and check the loaction of Project cache and preferences folder.
    that location by defalt is: C:\Users\ current user\Documents\Adobe Captivate Cached Projects
    Please check this and reply
    Thanks.

  • Safe Practice for Clearing Project Cache in Cap v.5

    Does anyone have a documented safe practice for clearing the Project Cache for Captivate v.5 projects?  Adobe has a fix for clearing cache for multiple projects in one step, but I'm wondering when is the best time to clear cache for a project.  My concern is clearing the project cache and then not being able to recover the project if the file get's corrupt (which is the original purpose for the cache in the first place).
    I've already done this once where I cleared the project cache and then couldn't open the file, then I didn't have the cached project available to recover the project.  Now I'm understandably a little gun-shy when using the Clear Cache option, but the alternative is to deal with a large amount of my computer storage being used for a bunch of files that I probably don't need.
    If anyone has the recommended list of steps and in the correct order, I'd really appreciate it.

    I don't know that there is any "documented safe practice" for when to clear the cache, but if you have Cp5 set to create backup files as well, even if you DO clear your cache, you should be able to recreate your project by renaming the backup file.
    I've been using Cp5 every day since it was in Alpha and I've only ever needed to restore a project from cache once.  In that case, my PC crashed while Cp was open and corrupted a project file.  But Captivate 5 has crashed plenty of times over the past year for one reason or another and yet I've never lost any more than a couple of hours work at worst.
    You are most likely to need this project restore feature if you've made the classic error of working from files stored on a network drive instead of your own hard drive.  If you only work from hard drive, install all the latest patches, keep your drivers and OS up to date, turn on the Cp backup file option, plus keep backups of all project files outside your PC, this is all the documented safe practice you need.
    Clearing the cache seems to solve quite a few otherwise baffling Cp issues.  I think you are more at risk by keeping the cache full than by clearing it.

  • How to Generate Unique Cache Keys?

    I'm trying to improve the performance of my ColdFusion 10 application by making better use of caching.  I have a particular DAO/Gateway CFC that queries a particular database.  I added query caching to the query in this CFC and it made a huge difference.
    Since this database is outside my control for edits/updates, I need to be able to initiate flushing of the cached queries for this database only.  I don't believe the built-in ColdFusion ehcache query cache allows for granular control of flushing - in CF Administrator you pretty much can only flush the entire cache.
    So I figured the only solution was to create my own cache region that would be associated with just this database, and manually cache the queries into that region.  Then I can flush just that region without impacting any other cached queries.
    So here's my difficulty:  I believe that Internally, ColdFusion caches queries using a hash of the generated SQL.  I'm thinking I'll store my queries in cache with a key that hashes the input parameters.  Would the built-in Hash() function be the appropriate mechanism to create cache keys that are unique for each parameter combination?  Does it matter what algorithm I use with Hash()?
    Thanks,
    -Carl V.

    Sorry, didn't see your original question! You might be better asking this on StackOverflow, as there's more people who have more experience with CF keeping an eye on the questions there.
    What I can offer is that MD5 hashes are not guaranteed unique for different input strings. It's unlikely to happen, but it can happen. I think - but am not sure - more "thorough" hashing algorithms might be more likely to have a higher degree of uniqueness.
    That said, the general approach is how these things are generally done.  And it's very very unlikely that you'll ever come to use a combination of elements contributing to the key that will generate a hash that you've already used for something else.
    Adam

  • Using Tangosol Coherence in conjunction with Kodo JDO for distributing caching

    JDO currently has a perception problem in terms of performance. Transparent
    persistence is perceived to have a significant performance overhead compared
    to hand-coded JDBC. That was certainly true a while ago, when the first JDO
    implementations were evaluated. They typically performed about half as well
    and with higher resource requirements. No doubt JDO vendors have closed that
    gap by caching PreparedStatements, queries, data, and by using other
    optimizations.
    Aside from the ease of programming through transparent persistence, I
    believe that using JDO in conjunction with distributed caching techniques in
    a J2EE managed environment has the opportunity to transparently give
    scalability, performance, and availability improvements that would otherwise
    be much more difficult to realize through other persistence techniques.
    In particular, it looks like Tangosol is doing a lot of good work in the
    area of distributed caching for J2EE. For example, executing parallelized
    searches in a cluster is a capability that is pretty unique and potentially
    very valuable to many applications. It would appear to me to be a lot of
    synergy between Kodo JDO and Tangosol Coherence. Using Coherence as an
    implementation of Kodo JDO's distributed cache would be a natural desire for
    enterprise applications that have J2EE clustering requirements for high
    scalability, performance, and availability.
    I'm wondering if Solarmetric has any ideas or plans for closer integration
    (e.g., pluggability) of Tangosol Coherence into Kodo JDO. This is just my
    personal opinion, but I think a partnership between your two organizations
    to do this integration would be mutually advantageous, and it would
    potentially be very attractive to your customers.
    Ben

    Marc,
    Thanks for pointing that out. That is truly excellent!
    Ben
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Ben-
    We do currently have a plug-in for backing our data cache with a
    Tangosol cache.
    See: http://docs.solarmetric.com/manual.html#datastore_cache_config
    In article <[email protected]>, Ben Eng wrote:
    JDO currently has a perception problem in terms of performance.
    Transparent
    persistence is perceived to have a significant performance overheadcompared
    to hand-coded JDBC. That was certainly true a while ago, when the firstJDO
    implementations were evaluated. They typically performed about half aswell
    and with higher resource requirements. No doubt JDO vendors have closedthat
    gap by caching PreparedStatements, queries, data, and by using other
    optimizations.
    Aside from the ease of programming through transparent persistence, I
    believe that using JDO in conjunction with distributed cachingtechniques in
    a J2EE managed environment has the opportunity to transparently give
    scalability, performance, and availability improvements that wouldotherwise
    be much more difficult to realize through other persistence techniques.
    In particular, it looks like Tangosol is doing a lot of good work in the
    area of distributed caching for J2EE. For example, executingparallelized
    searches in a cluster is a capability that is pretty unique andpotentially
    very valuable to many applications. It would appear to me to be a lot of
    synergy between Kodo JDO and Tangosol Coherence. Using Coherence as an
    implementation of Kodo JDO's distributed cache would be a natural desirefor
    enterprise applications that have J2EE clustering requirements for high
    scalability, performance, and availability.
    I'm wondering if Solarmetric has any ideas or plans for closerintegration
    (e.g., pluggability) of Tangosol Coherence into Kodo JDO. This is justmy
    personal opinion, but I think a partnership between your twoorganizations
    to do this integration would be mutually advantageous, and it would
    potentially be very attractive to your customers.
    Ben--
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • To open a project already under version in RoboHelp for the first time

    Hello Everyone,
    In RH html help it is mentioned that first time when you open
    your project in the new version (I have RH v6) which was created in
    the old version of RH (in my case it was created in RH x3) the
    project is converted to the new project file type (.xpj) and the
    old project file (.mpj) is deleted.
    So far, I have done the first step and project is converted
    to the new project file type (.xpj) but the old file type (.mpj) is
    still there – is it might be because it was read only.
    My greater concern is the next step which is mentioned in the
    Help, my supervisor doesn’t agree with that which is
    ‘Add the project back to version control in a different
    folder than the original .mpj project file. Somehow, he
    doesn’t agree with that and I am really not sure if there is
    going to be any impact for not doing that because currently in
    Windows explorer I can see both the project file types – one
    with the .mpj and the other one with the .xpj. And also, I am not
    sure if the huge difference in size of both the file types is a
    concern (old mpj file size is coming 544 KB & the new xpj file
    size is coming only 3KB). Please, give me your feedback.
    Your help is greatly appreciated,
    Thanks

    Hi all
    Trying to clarify here. Colum is mostly right.
    When an older project is opened in X5 or 6, the .MPJ file
    isn't really "Converted". What happens is that an XML file bearing
    the same name as the project but having the extension .XPJ is
    created along with a slew of other files. The former .MPJ file is
    then updated and renamed by changing its file extension. The .MPJ
    extension is renamed to .CPD. I could be wrong in my assumption of
    course, but I've always thought .CPD meant "Cache Project
    Database".
    Cheers and happy Thursday all! Rick

  • Content Presenter CMIS Query. Cache

    Hi!.
    Is it possible caching CMIS Queries in Content Presenter TaskFlows of WebCenter Portal PS3?
    Thanks :).
    Edited by: Daniel Merchán on 03-nov-2011 17:03

    Have a look at this post: http://yonaweb.be/webcenter_tutorial/using_content_presenter_templates
    And search for the "Building the List page" section. This shows how to use a query in the content presenter from within JDev.
    The query needs to be CMIS which you can find more information about in this post: http://yonaweb.be/using_cmis_query_content_query_navigation_model

  • My project file will not open

    I recently ended the task of trying to save my Captivate project because it wasn't responding. Prior to it not responding, I tried to insert an animation (swf.) and received the prompt that the video was created with Actionscript2 instead of Actionscript3 and that I ran the risk of the file or the video not correctly if I continued. I continued to add the video anyway, since it has worked before.
    Now I'm trying to open the project file and it won't let me. I get this message after several minutes of 'extracting files':
    Please help.
    Thanks!

    Hello,
    Welcome to Adobe Fourms.
    If you have folders for today's and yesterdays's date under "Adobe Captivate Cached Projects" folder (In My Documents), then you can try steps from this blog :
    http://blogs.adobe.com/captivate/2010/09/recovering-the-project.html
    Thanks,
    Vikram

  • Opening Captivate 4 project in 5 adds to slide notes, read by TTS

    I have a project that was started in Captivate 4, and when I open it in Captivate 5, it does the conversion and introduces &#x0A; in the slide notes which the TTS speech egnine reads.
    First, any ideas on why this would be happening, how to prevent it?
    Second, is there a way to do a seach and replace within the slide notes? The regular Find and Replace dialog doesn't show a Search In option for notes.

    all,
    I actually found the answer to my own question, in a way.
    One of my projects apparently was corrupt an it was causing the issue with the disappearing notes. However, after rebooting my computer, clearing the Adobe Captivate Cached Projects, I opened a different project in Adobe Captivate 5, and all the notes were in place. After a while, I figured that as long as I don't open the corrupt file, my notes remain in place. I had to recreate the corrupt file though and save it with a different name.
    I also noticed that the files are more likely to get corrupted if they are long (over 70-80 slides long) or if they have a lot of animations (really a lot).
    As for the people using Captivate 3.... You may be used to Captivate 3 and it may be hard to switch software, but Captivate 5 is a lot more powerful and has a lot less issues than Captivate 3 ever did. I would reconsider, if I were you...
    Sometimes, simply republishing a project helps...
    If the "stop" button is a problem, I'd copy all the slides (in the source file) to a fresh new project, except for the one with the stop button; and then I would try to recreate the button that causes the issue, save and republish the new project.

Maybe you are looking for

  • Stuck in a limbo: can't install Safari or Lion/Mountain Lion, can't access App Store

    If someone would take up this challenge and attempt to solve it with me, I would appreciate it! I have troubleshooted for 2 days now to no avail. This is what happened: 1) I accidentally installed Safari 6.0, even if I have Lion 10.7. which doesn't r

  • IMac Concerns/Questions

    I currently own a dual 1.42 G4 that I used for my video business. I had the computer for a while, so I am bored of it. I also work for a company, so i don't need a workstation anymore to clutter up the place. I am thinking an iMac with wireless acces

  • Making calls, screen goes black

    As soon as I make a call the screen goes black even if I have the screen set to stay on.  The only way to end the call is to push the power button than the screen will come on and I can hit the end phone button. My husband has the same phone and when

  • EMail Questions

    Hey I can't wait 'till the iPhone hits Australia. And I want to set up my email and have it all sorted before I buy my iPhone. My question is which email provider should I choose. I am with Windows Live Mail at the moment and I'm happy with it but it

  • Javax.swing.JTextPane - COLOR Problem

    Hi I am using javax.swing.JTextPane object to display text recieved from two servers. How can I make messages recieved from Server 1 to be in RED and while from Server 2 to be in Green? i.e. the window should look... (red) Server 1 says ta ta (green)