0

What is the "SELECT COUNT(*) FROM xz WHERE xz.a > value" equivalent for berkeleydb je. http://www.oracle.com/technetwork/database/berkeleydb/performing.pdf lists most of the queries I need. But this one is missing.

Currently I found a way by using the Collections API. EntityIndex.sortedMap().tailMap(key).size() to be specific. But that has limitations/problems:

  • size can not be larger that Integer.MAX_VALUE which is a problem if you use anything larger than int as index key
  • http:// download.oracle.com/docs/cd/E17277_02/html/java/com/sleepycat/collections/StoredContainer.html#size() reads to me that counting is not isolated by the current transaction. There will be many concurrent changes to the index and the relative position of each object in that index is compared to others. That comparison needs to be accurate since the payment model is based on that.

Currently I evaluate berkeleydb je-4.1.6/DPL.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Reiner
  • 1
  • 1

1 Answers1

0

I just noticed that this question had gone unanswered. Similar questions have been asked and answered on the Berkeley DB forums. You may be interested in either of these: http://bit.ly/gx0nwv or http://bit.ly/dZYGhZ

In the future you may find that you get faster answers about Berkeley DB products on the Oracle Technology Network forums for Berkeley DB, which can be found here.

dsegleau
  • 1,942
  • 9
  • 13