<<上篇 | 首页 | 下篇>>

Jisp Java Database Performance

Jisp,A small, embedded database engine written in Pure Java.Jisp Performance is slower than Perst,db4o,jdbm,Berkeley DB Java Database.

The TestIndex benchmark measures the performance of such basic operations as storing/fetching objects and locating objects using an index. This test contains three steps: 

  1. Create a specified number of records with random long integers and string keys and include them in long integer and string indices. After inserting of all records, a commit is performed.
  2. Search for each record using a long integer and string key.
  3. Search for and remove each record from the indices and deallocate it from storage.

阅读全文……

标签 :

JDBM纯Java数据库性能测试评估

JDBM性能测试评估,最近想选择一个轻量、可伸缩、高性能的嵌入式数据库,所以对JDBM 纯Java数据库进行了测试评估。从结果看来JDBM还是挺不错的,和db4o,Perst,Berkeley DB是一个级别的,每秒能插入10000个对象,10000次对象查询能在1秒内完成,删除10000个对象也大约能在1-2秒内完成。看来表现最差的JISP,insert、search、delete差不多都需要30秒。

版本:

jdbm-unspecified.jar(1.0)

结果:

Elapsed time for inserting 100000 records: 12282 milliseconds
Elapsed time for performing 100000 index searches: 7125 milliseconds
Elapsed time for deleting 100000 records: 16203 milliseconds

阅读全文……

标签 :

How to read all the data from an Lucene index?

How to read all the data from a Lucene index?

Document numbers start at 0. You will never get a document marked "deleted" from either IndexReader or IndexSearcher.


IndexReader reader = IndexReader.open(....);

for (int i = 0; i < reader.maxDoc(); i++) {
       if (reader.isDeleted(i)) {
               continue;
       }
       Document doc = reader.document(i);
       ...
}

Hint: if you have an unoptimized index with deleted documents, and you want to retrieve also the content of these deleted documents, call first IndexReader.undeleteAll().

Apache Lucene is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform.

Apache Lucene is an open source project available for free download. Please use the links on the left to access Lucene.

 

 

补充另一个方法:

 TermDocs td = IndexReader.termDocs(null);

然后迭代td

标签 : ,