4 Replies Latest reply on Apr 10, 2017 11:10 AM by William Burns

    Number of entries call on a JDBC store iterates over all entries in the database

    Wolfram Huesken Newbie

      I'm using embedded Infinispan 9.0.0.FINAL with INVALIDATION_SYNC and a JDBC Store (JdbcStringBasedStore). When I want to fetch the number of entries (e.g. via JMX), the

      Stats Implementation (StatsImpl) calls the CacheMgmtInterceptor which invokes this operation:

       

      https://github.com/infinispan/infinispan/blob/7bf7ddf0158f4eeac188092a4af70d5c6420291c/core/src/main/java/org/infinispan/interceptors/impl/CacheMgmtInterceptor.java#L355-L357

       

      I'd prefer a SELECT COUNT(*) over a SELECT * and counting in memory. Is this configurable or is there a way to change this behaviour?