ehCache query performance issue

158 views
Skip to first unread message

Hari Kannan

unread,
Jun 9, 2015, 4:59:03 PM6/9/15
to ehcach...@googlegroups.com
  1. What version of Ehcache you are currently using; ehcache-core-2.6.5.jar(open source)
  2. Paste the configuration for the Cache/CacheManager you have an issue with;
  3. <cache name="procd" maxElementsInMemory="0" eternal="true"
  4. overflowToDisk="false">
  5. <searchable keys="true" values="false">
  6. <searchAttribute name="nbr" expression="key.getNbr()" />
  7. <searchAttribute name="prefixValue" expression="key.getPrefixValue()" />
  8. <searchAttribute name="effDt" expression="key.getEffDt()" />
  9. <searchAttribute name="endDt" expression="key.getEndDt()" />
  10. </searchable>
  11. </cache>
  12. Add any name and version of other library or framework you use Ehcache with (e.g. Hibernate);spring 3.2.8 release
  13. 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

Hari Kannan

unread,
Jun 9, 2015, 5:54:06 PM6/9/15
to ehcach...@googlegroups.com
I tried the same query in a trial version of Big Memory Go, with same ehCache.xml. It runs even slower in Big Memory Go. Am I missing something obvious here?
Reply all
Reply to author
Forward
0 new messages