Delete operation is 50 x slower than insert?

Hi community,

I have created the following dummy function for testing the performance of insert/delete operations:

try {
var start =;

for (var i=0;i<20000;i++) {

    var testVertex = api.newVertex("TEST");;

  var millis = - start;

  start =;

  millis = - start;
  print("Creation Done. - time elapsed:" + millis + " ms");

  start =;
  db.command("DELETE VERTEX FROM TEST");
   millis = - start;

  print("Deletion Done. - time elapsed:" + millis + " ms");
} catch (e) {

The result on our test machines (16gb ram, 8 core) is as follows:

 Creation Done. - time elapsed:702 ms
 Deletion Done. - time elapsed:35756 ms

The creation of the vertices seems to be OK but the deletion speed is way too slow. :scream:

Is this expected behaviour? What can I do to improve the speed.


What version do you use ?
I used latest develop version and have got following numbers:
Creation time 1,350,704 ms., deletion time 1,251,092 ms. Code which I used is there

I’am using 3.0.23.

From your high numbers I assume you mean microsecs right ? Why is your deletion so fast? Even if I am doing the deletion in Studio it seems quite slow so I assume it has nothing to do with the fact that I am doing the task in embedded javascript.