-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"delete from" significantly slows down database inserts #3100
Comments
There are a lot of WAL file created during insert |
This is a concerning issue – wouldn't this happen on a regular production database with lots of inserts and deletes? |
Any updates on this issues? This is also very important for the usage in my project... |
Hi, On Mon, Sep 21, 2015 at 5:09 PM doppelrittberger notifications@github.com
|
duplication of #5267 |
Created this ticket as a result of a google group thread: https://groups.google.com/forum/#!topic/orient-database/laAWCeqV28g
Essentially once you do a "drop from Element" inserts slow to a crawl. Here's a further description with some code from the thread:
After creating the database from scratch and inserting 15K records a few times, it works pretty quickly (around 2s/15K with a unique index on Element.id).
I then run "delete from Element" from the web console and try again. Now the inserts are taking close to 20s per 15K and the only way to fix it is to drop and create the database.
Thanks!
PS I'm using this very simple insert script for a single class Element:
ODatabaseDocumentTx db = ODatabaseDocumentPool.global().acquire("remote:localhost/IceTest", "root", "password");
try {
db.begin();
db.declareIntent(new OIntentMassiveInsert());
Date now = new Date();
long last = System.currentTimeMillis();
for (int i = 0; i < 15000; i++) {
ODocument el = db.newInstance("Element");
el.field("dateCreated", now);
el.field("lastEdited", now);
el.field("id", UUID.randomUUID().toString());
el.save();
}
db.commit();
System.out.println(System.currentTimeMillis() - last);
} finally {
db.close();
The text was updated successfully, but these errors were encountered: