- What version of Ehcache you are currently using; ehcache-core-2.6.5.jar(open source)
- Paste the configuration for the Cache/CacheManager you have an issue with;
- <cache name="procd" maxElementsInMemory="0" eternal="true"
- overflowToDisk="false">
- <searchable keys="true" values="false">
- <searchAttribute name="nbr" expression="key.getNbr()" />
- <searchAttribute name="prefixValue" expression="key.getPrefixValue()" />
- <searchAttribute name="effDt" expression="key.getEffDt()" />
- <searchAttribute name="endDt" expression="key.getEndDt()" />
- </searchable>
- </cache>
- Add any name and version of other library or framework you use Ehcache with (e.g. Hibernate);spring 3.2.8 release
- Providing JDK and OS versions maybe useful as well - Jdk 1.6.0_45 64 bit , Windows 7 Enterprise 64 bit
I have about 375K records in this cache and when I query this cache the query is real slow - about 200ms. Any thing I can do to improve performance. Is the data indexed by ehCache automatically or should I do anything else to index?
This is the query I am trying to execute:
Query query = procdCache.createQuery();
query.includeValues();
query.maxResults(1);
query.addCriteria(
_nbr.eq(nbr).and(_prefixValue.eq(prefixValue)).and(_effDt.le(effDateAsInt))
.and(_endDt.ge(endDateAsInt))).end();
query.execute()
Thanks