java - JDBC Query Caching and Precaching -



java - JDBC Query Caching and Precaching -

scenario:

i have need cache results of database queries in web service. there 30 tables queried during cycle of service call. confident info in date range accessed service, , pre-cache data. mean caching around 800,000 rows @ application startup, info read-only. info not need dynamically refreshed, reference data. cache can't loaded on each service call, there's much info that. info outside of 'frequently used' window not time critical , can lazy loaded. queries homecoming 1 row, , none of tables have parent/child relationship each other, though there few joins. there no need dynamic sql support.

options:

i intended utilize mybatis, there isn't method warm cache. mybatis can't understand service query select * table key = ? covered startup pre-cache query select * table.

as far understand (documentation overload), hibernate has same problem. additionally, these tables designed composite keys , no primary key, hassle hibernate.

question:

preferred: there mybatis solution problem ? i'd much utilize it. (familiarity, simplicity, performance, funny name, etc)

alternatively: there orm or db-friendly cache offers i'm looking ?

you can utilize distributed caching solution ncache or tayzgrid provide indexing , queries features along cache startup loader.

you can configure indexes on attributes of entities in cache. cache startup loader can configured load info database in cache @ cache startup. while loading data, cache create indexes entities in memory.

object query language (oql) feature, provides queries similar sql can used query in-memory data.

java hibernate caching orm mybatis

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -