My setup is: Java 1.7, Tinkerpop 2.6, Titan 0.5.3, Cassandra 2.1.2 and Easticsearch 1.4.2.
My problem is that I have extremely slow reads. In my test code I'm inserting only one Vertex with one property. This takes 5 ms. Then I try to read this Vertex again. This takes 1500 ms. Why is the reading 300 times slower?
Any help is much appreciated.
long d1 = new Date().getTime();
String id = UUID.randomUUID().toString();
Vertex customer = g.addVertex();
customer.setProperty("somethingnew", id);
g.commit();
long d2 = new Date().getTime();
long d3 = 0;;
Iterable<Vertex> its = g.query().has("somethingnew", id).vertices();
for (Vertex vert : its) {
if (vert.getProperty("somethingnew").toString().equals(id)) {
d3 = new Date().getTime();
}
}
System.err.println( "Insert took [ms]:" + (d2 - d1));
System.err.println( "Read took [ms]:" + (d3 - d2));
您可能应该阅读有关索引的文章
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.