title: How to store a huge (Oracle) dataset in memory cache
body: <p><strong>Description:</strong> I have a transaction table, with average of ~200 (+-100) rows inserts per second, from which the present system queries to retrieve the data based on client ids with/without the time (order-by ascending) and few other conditions. This table is partitioned in such a way that the table contains data for current day only, the earlier data are stored on &lt; table_name_date_year >.  The query is run on this table to generate various detailed reports for the customers.</p>
  
  <p>A recent change to improve performance, 1) fetch min and max of the table, 2) query the table on every 50000 records in parallel (only 5 at a time), run the query with conditions between the &lt; from > and &lt; to >, till the max is reached 3) generate report, 4) combine the reports.</p>
  
  <p><strong>The Problem:</strong> Having done various query tuning by the database developers, the query still runs slower (takes many minutes to finish).</p>
  
  <p>Can an in-memory data cache like memcached or redis (or ehcache?) or "any other cache frameworks" be used to store/update the data stored against the client-id, such that the reporting system fetches the data from the cache and generates the reports, instead to query straight from thge primary-db? (example: &lt; key, pair >, &lt; client-id, { dataset } >) If so how?</p>
  
  <p>Can a bigdata implementation like HAZELCAST or Terracotta or (I haven't explored much on this) or Apache Gora be used here? If so how?</p>
  
  <p>Can a Java based solution be developed using <code>MappedByteBuffer</code>, but will this be efficient?</p>