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
金融危机下软件企业的机遇
虽然觉得中国的软件企业效率比较低,软件产品质量也不出色,中国自身的软件研发技术和管理技术需要大步的提升。但是,在金融危机下中国软件企业仍然有一些机遇。
从19世纪60年代以来,信息科技已经对几乎所有的行业进行了洗礼,这次金融危机将会对许多行业的风险管理、信息管理提出更高的要求;而企业对降低成本将有更高的要求;这些对中国的软件企业尤其是软件外包企业都是重大的机遇。高人力成本地区也将会更多考虑将事情放到低成本的地区去做。
