OrientDB slow write

南楼画角 提交于 2019-12-04 02:30:22

You can achieve that by using 'Flat Database' and orientdb as an embedded library in java see more explained here http://code.google.com/p/orient/wiki/JavaAPI

what you use is server mode and it sends many requests to orientdb server, judging by your benchmark you got ~10 000 inserts per seconds which is not bad, e.g I think 10 000 requests/s is very good performance for any webserver (and orientdb server actually is a webserver and you can query it through http, but I think java is using binary mode)

gusto2

The numbers from the OrientDB site are benchmarked for a local database (with no network overhead), so if you use a remote protocol, expect some delays.

As Krisztian pointed out, reuse objects if possible.

Krisztian Kocsis

Read the documentation first on how to achive the best performance!

Few tips:

-> Do NOT instantiate ODocument always:

  final ODocument doc;
  for (...) {
    doc.reset();
    doc.setClassName("Class");
    // Put data to fields
    doc.save();
  }

-> Do NOT rely on System.currentTimeMillis() - use perf4j or similar tool to measure times, because the first one measures global system times hence includes execution time of all other programs running on your system!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!