Skip to content
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

Closed
gemmell opened this issue Nov 26, 2014 · 5 comments
Closed

"delete from" significantly slows down database inserts #3100

gemmell opened this issue Nov 26, 2014 · 5 comments

Comments

@gemmell
Copy link

gemmell commented Nov 26, 2014

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();

@gemmell gemmell changed the title delete from "delete from" significantly slows down database inserts Nov 26, 2014
@sunnyfnc
Copy link

sunnyfnc commented Dec 2, 2014

There are a lot of WAL file created during insert

@stuartcarnie
Copy link
Contributor

This is a concerning issue – wouldn't this happen on a regular production database with lots of inserts and deletes?

@doppelrittberger
Copy link

Any updates on this issues? This is also very important for the usage in my project...

@andrii0lomakin
Copy link
Member

Hi,
It will be part of new transaction design so we plan solution for this
issue till the end of the year.

On Mon, Sep 21, 2015 at 5:09 PM doppelrittberger notifications@github.com
wrote:

Any updates on this issues? This is also very important for the usage in
my project...


Reply to this email directly or view it on GitHub
#3100 (comment)
.

@lvca lvca added this to the 3.1 milestone Dec 4, 2015
@andrii0lomakin
Copy link
Member

duplication of #5267

@andrii0lomakin andrii0lomakin removed this from the 3.1 milestone Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants