Oracle 11g result cache and TimesTen

Oracle 11g has introduced the concept of result cache whereby the result set of frequently executed queries are stored in cache and used later when other users request the same query. This is different from caching the data blocks and exceuting the query over and over again.
Tom Kyte calls this just-in-time materialized view whereby the results are dynamically evaluated without DBA intervention
http://www.oracle.com/technology/oramag/oracle/07-sep/o57asktom.html
My point is that in view of utilities like result_cache and possible use of Solid State Disks in Oracle to speed up physical I/O etc is there any need for a product like TimesTen? It sounds to me that it may just asdd another layer of complexity?

Oracle result cache ia a useful tool but it is distinctly different from TimesTen. My understanding of Oracle's result cache is caching results set for seldom changing data like look up tables (currencies ID/code), reference data that does not change often (list of counter parties) etc. It would be pointless for caching result set where the underlying data changes frequently.
There is also another argument for SQL result cache in that if you are hitting high on your use of CPUs and you have enough of memory then you can cache some of the results set thus saving on your CPU cycles.
Considering the arguments about hard wired RDBMS and Solid State Disks (SSD), we can talk about it all day but having SSD does not eliminate the optimiser consideration for physical I/O. A table scan is a table scan whether data resides on SCSI or SSD disk. SSD will be faster but we are still performing physical IOs.
With regard to TimesTen, the product positioning is different. TimesTen is closer to middletier than Oracle. It is designed to work closely to application layer whereas Oracle has much wider purpose. For real time response and moderate volumes there is no way one can substitue TimesTen with any hard wired RDBMS. The request for result cache has been around for sometime. In areas like program trading and market data where the underlying data changes rapidly, TimesTen will come very handy as the data is real time/transient and the calculations have to be done almost realtime, with least complications from the execution engine. I fail to see how one can deploy result cache in this scenario. Because of the underlying change of data, Oracle will be forced to calculate the queries almost everytime and the result cache will be just wasted.
Hope this helps,
Mich

Similar Messages

  • Oracle 11g Result Cache

    Hi,
    I have read that there is SGA component called Result Cache. According to documentation:
    The result cache buffers query results. If a query is run that
    already has results in the result cache, the database returns
    results from the result cache instead of rerunning the query. This
    speeds up the execution of frequently run queries.
    What happens when data in tables which are called by the query change. I think the old data still will be in cache and I always get the old data.
    Peter D.

    Hi Peter
    What happens when data in tables which are called by
    the query change. I think the old data still will be in
    cache and I always get the old data.The server result cache can return old data only for distributed queries (i.e. queries also retrieving data from other databases).
    All local queries return the correct data. To do so, the cache entries are invalidated as required.
    HTH
    Chris Antognini
    Author of Troubleshooting Oracle Performance, Apress 2008 (http://top.antognini.ch)

  • Oracle result cache and functions

    Hi All,
    I am on 11.2 in Linux.
    I want to use Oracle's result cache to cache results of (user defined) functions, which we use in SELECT commands.
    My question is, does result caching work for deterministic and non-deterministic functions ?
    Just curious, how Oracle keeps track of changes being made which affect a function's return value?
    Thoughts please.
    Thanks in advance

    I want to ... cache results of (user defined) functions, which we use in SELECT commands.You have four choices:
    1. Subquery caching - (wrap function call in SELECT) useful for repeated function calls in a single SELECT
    2. Marking function as DETERMINISTIC - inconsistent results across versions, deterministic best reserved for function-based indexes only
    3. Result Cache
    4. Move function logic out of function and inline to the main SQL statement.
    The biggest downside of any function call that is inline to SQL is that it bypasses the read consistency mechanism, actually that's probably the second biggest downside. The biggest downside is normally that their misuse kills performance.
    If your function itself contains SQL then you should seriously reconsider whether you should be using a function.
    does result caching work for deterministic and non-deterministic functions ?Result cache knows nothing about determinism so yes it should be applied regardless.
    Oracle keeps track of changes being made which affect a function's return value?See v$result_cache_dependency.
    The mechanism is very blunt, there is no fine-grained tracking of data changes that may affect your result.
    It's as simple as function F1 relies on table T1. If the data in table T1 changes, invalidate the results in the result cache for F1.

  • Oracle 11g Server Installation and Configuration

    Hi All..
    I would like to know the estimate(in detail) for Oracle 11g Server Installation and Configuration.
    This is for a server and we might even need to replicate the entire DB.
    Can any on please help me out in this .
    Thank you

    Hi,
    Please post your question in the [Database |http://forums.oracle.com/forums/category.jspa?categoryID=18] forum.
    Regards,
    Hussein

  • Does OCI client result cache and oracle UCP work together?

    I'm using Oracle 11.2.1.0. I've set up FCF and enabled OCI result cache on server side, so on client side, I'm using UCP for failover.
    this is my datasource configuration:
    <Resource name="jdbc/MyPool"
    auth="Container"
    factory="oracle.ucp.jdbc.PoolDataSourceImpl"
    type="oracle.ucp.jdbc.PoolDataSource"
    connectionFactoryClassName="oracle.jdbc.pool.OracleDataSource"
    url="jdbc:oracle:oci:@dbhost:1521/myDb"
    user="db_user"
    password="db_password"
    fastConnectionFailoverEnabled="true"
    onsConfiguration=""
    connectionPoolName="dbPool"
    initialPoolSize="5"
    minPoolSize="5"
    maxPoolSize="25"
    connectionWaitTimeout="10000"
    inactiveConnectionTimeout="120000"
    abandonConnectionTimeout="60"
    validateConnectionOnBorrow="true"
    sqlForValidateConnection="select user from dual"
    maxStatements="30"/>
    I've enabled OCI client result cache.
    I use /*+ result_cache */ in my query to take advantage of the result cache.
    so I execute the following scenario:
    i) select /*+ result_cache */ value from myTable where id=1; (this returns a result.)
    ii) update myTable to set a different value for id=1 record;
    iii) run select query again; (this should return a different result. oci result cache gets updated when table changes.)
    if I take out
    "sqlForValidateConnection" and/or "validateConnectionOnBorrow" (i.e. disable sql validation on borrow), the 2nd query after table update doesn't show the latest result. it's still showing the old query result.
    is this a bug? that UCP validation on borrow has an impact on OCI result cache function? this doesn't happen if using dbcp java connection pooling with OCI result cache.

    it turns out I ran the test against an oracle server that doesnt have FCF configured, nor ONS.
    once i switched to a correct oracle cluster, my test passed.

  • How to manage connectivity between Oracle 11g &9i Database and Visual Studio 2010 professional in window 7

    Hi,
     I am not able to resolve the error of
    “ORA-12514: TNS:listener does not currently know of service requested in connect descriptor”
    Below Link is the indication,  related to that error.

    Hi Surbhi.Gupta,
    Thank you for posting in MSND forum.
    According to your descriptiom, I suggest you could try the following blog to connect to Oracle from Visual Studio check your issue again.
    Reference:
    http://blogs.msdn.com/b/kaevans/archive/2009/07/18/connecting-to-oracle-from-visual-studio.aspx
    In addition, as you said the error message, I did some research about this error message. So I suggest you could refer then following thread to check your error, maybe you will get some useful message.
    http://dba.stackexchange.com/questions/36370/oracle-11g-listener-fails-with-ora-12514-and-ora-12505-errors
    However, since this issue is related to the third-party database oracle, so if possible, I suggest you could try to post your issue directly to this Oracle official website:http://www.oracle.com/us/corporate/contact/about-your-account-070507.html
    , you will get better support.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Oracle 11g, OL 6 and ext4

    Now that Oracle Linux 6 has been certified for Oracle 11gR2, does this also include the use of the ext4 file system?
    I'm asking because I found database performance and block corruption warnings searching in Google, but perhaps this only applied to early implementations of ext4 or were simply wrong assertions. I imagine that certification includes ext4, but just to be sure, is there still a reason to be concerned about it?

    Dude wrote:
    Concurrent I/O seems to be a topic often discussed when comparing XFS with ext4. If I'm not mistaken then ext4 supports concurrent I/O, but there is a performance penalty compared to XFS, i.e. fragmentation. However, I have not found any information outlining that this was a new issue introduced with ext4.
    Apparently people are storing Oracle datafiles under ext3 without problems. The ext4 filesystem is the successor of ext3 and ext2, providing more features and robustness. How performance issues of Oracle DB pertain to ext4 is probably subject to errata and updates.
    From what I can gather, ASM (ACFS), or OCFS2 in a RAC environment are the best options under Linux. Performance results will also depend on the underlying storage technology, for instance, caching, SSD or conventional rotary devices.It supports concurrent reads, not writes so if you're running a warehouse type database where it's mostly reads, you'd be fine but if you're doing a lot of writes, you should consider other options (assuming you care about latency and performance).
    Personally, I think ASM is the way to go these days for Oracle DBs and you're right, there are a ton of factors to consider when architecting your ASM configs. For example, Oracle suggests putting all your database disks in one huge diskgroup because they claim that performance is better in that case, though I've run quite a lot of tests over the last couple years suggesting otherwise. At the end of the day, most people don't care about performance (though they may say otherwise) and certainly don't take the time to do much tuning. My situation was a bit different due to the nature of the business but even Jim Williams and some of the other folks on the ASM team didn't seem to have initially gone as in-depth as I may have when it came to tuning.
    The best thing you can do is run your own tests with tools like fio, orion, swingbench, etc. and figure out if the performance is acceptable based on your needs.

  • Oracle 11g - Sequence Caching

    From the oracle documentation, http://docs.oracle.com/cd/E11882_01/server.112/e10701/original_export.htm#BABJHCDH
    it says that sequence numbers that have been allocated are available for use in the current database.
    I have a table Test which has a column test_id having a sequence test_sequence.
    Max value in the test_id is 20 and assume if test_sequence is cached for 20 in a 2 RAC node with each node caching numbers from 20-30 and 30-40.
    If I do an export and import the sequences to a new database, will my next sequence number in the new database be 41 ?
    If so, what will be the LAST_NUMBER in the dba_Sequences table in the source database.
    Thanks in advance.

    Hi,
    if you set CACHE 20 in a RAC environment each node will cache 20 number. In your case - cached numbers will be 21-40 and 41-60 and the dba_sequences.last_number=60.
    If you do export/import all the cached numbers will be lost and your first number will be last_number+1.

  • Oracle 11g new features and download.

    Hi,
    What are the new features of oraacle 11g and when I will be able to download 11g database.
    Regards
    MMU

    Hi
    We may get more information after this 11g launch by today.
    Oracle Database 11g Launch - New York City
    http://www.oracle.com/webapps/events/EventsDetail.jsp?p_eventId=66665

  • Can Oracle 11g R2 RAC and database sit on Windows 2008 R2?

    Thanks.

    2008 32 bit it is certified...
    2008 64 not certified yet.
    the certification matrix within MOS does not indicate 2008 R2 so you might be good for 32 bit.
    NOTE: just double checked the matrix and it is certified for windows 2008 R2 x64
    Product      Oracle Server - Enterprise Edition
    Product Release      11gR2 RAC
    Product Version      11gR2 RAC
    Tier      Server
    Tier Product      N/A
    Tier Product Version      N/A
    Platform      Microsoft Windows x64 (64-bit)
    Platform Version      2008 R2
    Certification Status      Certified
    Expand All | Collapse All
    Expand to view Notes Notes
    Expand to view Certification Notes Certification Notes
    Edited by: rui_catcuddler on Jul 22, 2010 10:02 AM

  • Oracle 11g Instant Installer and NLS_LANG

    Hi,
    could anybody tell me where I can set the NLS_LANG on Win7? I use the Instant Installer and I dont have any registry entry...
    Markus
    Edited by: user5278245 on 23.05.2012 16:22

    If you are referring to Instant Client, then please see the FAQ - http://www.oracle.com/technetwork/database/features/oci/ic-faq-094177.html
    HTH
    Srini

  • Split Oracle 11g Table Partition and Insert new rows

    Hi,
    I have a doubt that i would like to be clarified. I need to split a partition of a table with more than 800 Million records, but at the same time (during the split operation) i need to insert new records (not in the partition that is being splited). Is there any problem/risk doing this? Is the insert ETL process going to fail ?
    Thanks in advance
    Greetings.
    Nuno
    Edited by: user13512889 on 1/Set/2011 3:25

    Hi Enrique,
    Thanks for posting in MSDN.
    Based on the description, you want to modify the formula for the A1 and B1 cell when you insert a new rows.
    Yes, we can use Worksheet.Change to dermin the change of data on the worksheet then we can modify the formula as we wanted. Here is a sample for your reference:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Me.Range("A1").Formula = "=MAX($A2:$A" & Me.UsedRange.Rows.Count & ")"
    Me.Range("B1").Formula = "=MIN($B2:$B" & Me.UsedRange.Rows.Count & ")"
    End Sub
    You can more detail about Excel VBA developing from link below:
    Getting Started with VBA in Excel 2010
    Welcome to the Excel 2013 developer reference
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using TimesTen with Oracle 11g

    In documentation I didn't find any information about supporting by Timesten connects to Oracle 11g. So is Timesten can be connected to Oracle 11g or not? Now I've connected it but I'm not sure in proper work of this pair.

    TimesTen 7.0.3 Cache Connect to Oracle supports Oracle 11g on Linux x86 (32-bit).
    Additional platforms will be certified in upcoming maintenance release.
    What platform are you using?
    - Susan

  • PL/SQL Function Result Cache?

    Hi all,
    As we know, there's a new feature in 11g, called 'result cache', this 'result cache' can be shared throughout the whole instance, but if I got it right, only sql query result and function return value are cached, right? how about the store procedure, I mean, procedure also has its 'return value'--the output parameter, could it benefit from this new feature?
    Another question is, if my PL/SQL Function just retrieves the table and returns the result without any complicated calculation, is it necessary to enable the 'result cache' mechanism on this Function? because we already have 'db buffer cache' if the only thing we do is to query tables.
    Many thanks.

    Hi Morven,
    As of now, PL/SQL Result cache feature is only enabled for stored functions and not for procedures. This is due to the objectives they achieve. Functions are usually computative and procedures are for logic implementation.
    And for enabling result caching feature for a function, you are the better judge as u can test the performance in both the case. But, i would support enabling the cache because oracle 11g provides Cache as a different SGA component. db_buffer_cache will also be used for buffering other data blocks and not the result sets.
    Hope my explanation is fine.

  • Oracle 11g benefits

    Hello Guys
    Oracle 11g new features notes as found on web very generic
    if i want to convince my client to switch from oracle 10g to oracle 11g,this information will not be useful
    if you had migrated to 11g and worked on it,please reply practical reasons from dba point of view
    how customer will be benefited from migrating from oracle 10 g to 11g
    like if i mentioned to him ADR feature it doesnt makes sense to him
    Active dataguard may be one of feature but will be have any benefit where dataguard is implemented
    still to application guys also it will give any advantage
    say for example i am discussing this with Application team head ,how will he benefit from migrating to 11g
    what feature will be benefitted to him and how
    will this feature will be appealing enough to efforts in migration
    thanks
    cheers

    In my opinion, the best way to convince them is to do an assessment for their particular environment, based on the specifics.
    For example, I've done such one for a database and here are some of the points:
    1. Almost 30%(as reported by Grid Control) of frequently executed queries are on tables like XX.XXXX and YY.YYYYY. These tables are relatively small and statements , and functions on them are good candidates for modification to use :
    Query Results Cache and PL/SQL Function Result Cache (Oracle 11G Enterprise Edition option, no extra cost needed).
    2. From time to time we experience sudden execution plan changes and get worse plans. This degrades applications' performance orders of magnitude. Oracle 11g has a new built-in feature called "SQL Plan Management". As described in the docs:
    "SQL plan management prevents performance regressions resulting from sudden changes to the execution plan of a SQL statement by providing components for capturing, selecting, and evolving SQL plan information. If you are performing a database upgrade that installs a new optimizer version, it can result in plan changes for a small percentage of SQL statements, with most of the plan changes resulting in either no performance change or improvement. However, certain plan changes may cause performance regressions.
    With SQL plan management, the optimizer automatically manages execution plans and ensures that only known or verified plans are used. When a new plan is found for a SQL statement, the plan is not used until it has been verified by the database to have comparable or better performance than the current plan. This means if you seed SQL plan management with your current (pre-11g) execution plan, which will become the SQL plan baseline for each statement, the optimizer uses these plans after the upgrade. If the 11g optimizer determines that a different plan should be used, the new plan is queued for verification and will not be used until it has been confirmed to have comparable or better performance than the current plan."
    I don't expect this to be perfect but at least it will decrease the number of such problematic periods.
    3. 10g Recovery Manager doesn't support parallelism per datafile. In our environment we have several 30+GB datafiles and since our storage system is not very fast for such type of operations, non-parallel restore of a single datafile will take much more time compared to the same activity on 11g. 11g supports RMAN datafile restore in parallel.
    4. Several optimizations in optimizer work. One of them is better handling of full scans:
    We've done some tests 10g/11g and were surprised because of this direct path read/db file scattered reads thing. Our tests are:
    Two databases - one 11g and one 10g with same sga_target,sga_max_size(500MB) and pga_aggregate_target(200MB), everything else is as it is set during install by DBCA. These two databases run on one host.
    The storage is a NAS(6 discs) managed by 11g ASM (one normal redundancy diskgroup ) which is used by the databases.
    I imported a 3GB table on every database and gathered stats. To not go in detail as of now, the results are:
    three consecutive runs on 11g.
    average execution time - 50 seconds
    three consecutive runs on 10g.
    average execution time - 125 seconds
    The statement is:
    select /*+ full(t) nocache(t) */ count(1) from zz.zzz t;
    and there is no other activity on the host and the storage.
    Same number of logical and physical reads during 11g and 10g runs.
    During the above runs while run on:
    11g, iostat reports ~14MB/s per disk
    10g, iostat reports ~5MB/s per disk
    After tracing these sessions we figured out that on 11g direct path read is used, while 10g uses db file scattered read.
    5. We can use AUDIT_SYS_OPERATIONS in conjunction with XML,EXTENDED for auditing purposes. 10.2.0.4 has a bug for this that is fix in 11.1.0.6 onwards.
    6. Database Resident Connection Pooling(Concepts guide 11g documentation)
    "Database Resident Connection Pooling (DRCP) provides a connection pool in the database server for typical Web application usage scenarios. DRCP pools dedicated servers, which comprise of a server foreground combined with a database session, to create pooled servers.
    A Web application typically acquires a database connection, uses the connection for a short period, and then releases the connection. DRCP enables multiple Web application threads and processes to share the pooled servers for their connection needs.
    DRCP complements middle-tier connection pools that share connections between threads in a middle-tier process. DRCP also enables you to share database connections across multiple middle-tier processes. These middle-tier processes may belong to the same or different middle-tier host.
    DRCP enables a significant reduction in key database resources that are required to support a large number of client connections. DRCP reduces the amount of memory required for the database server and boosts the scalability of both the database server and the middle-tier. The pool of readily available servers also reduces the cost of re-creating client connections.
    DRCP is especially useful for architectures with multi-process, single-threaded application servers, such as PHP and Apache servers, that cannot do middle-tier connection pooling. The database can scale to tens of thousands of simultaneous connections with DRCP."
    It will help us to improve dedicated server usage(currently we use shared server).
    7. A lot of bug fixes for bugs that don't have 10g patches , fixed in 11g only and affect us - examples XML,EXTENDED and AUDIT_SYS_OPERATIONS bug, FGA bugs, job system on logical standby database , "ORA-12569: TNS:packet checksum failure" during sqlplus login and so on.
    It's for sure that there are much more such convincing points, but a several days assessment will make it possible to identify the most important ones from performance/availability/security perspective for their environment. As it is often the case - the devil is in the details. It's all about the way they use the database.

Maybe you are looking for

  • Error in VBA reference for Adobe Photoshop CS4 Object Library

    Hello, I'm using Windows 7 Pro, MS Office 2010 Pro and Creative Suite CS4 (with all updates). I will automate Photoshop via Visual Basic for Applications in MS Access. Befor using there the Adobe Photoshop CS4 Object Library I must reference it in VB

  • How to:Create a blank document, and how to make a font available for editin

    Two questions: 1: How do I create a new PDF document? All I see is to create from an existing document or scanner. If I'm creating something from scratch, do I really have to load an existing PDF, delete everything and then start my new document? Tha

  • Can I share my iCloud files that are stored with friends? How?

    I don't understand iCloud at all. I just know it apparently automatically gets stuff off my phone and ipad and stores it so I am always backed up. Am I able to actually SEE my backed up files by going to "iCloud"?? Like going to a web page and seeing

  • PO Confirmations

    Hi, I have enabled confirmations required in PO and again in change mode i have entered the confirmation category AB and the related entries.While i am going for MIGO against the PO its telling as PO has no items. What needs to be done for this. Rega

  • Hp laserjet 4L printing funky

    So the other day, my laserjet 4L printing through my dlink dp-300u started acting up. What is printing is not what I see. I'm getting a million blank pages except for some odd characters on top. I haven't printed in a while but am wondering if it has