question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Increasing creation time for new types/clusters, if an index is defined

See original GitHub issue

In the context of a converter from SQL to graph database, I benchmarked the creation of new types in OrientDB. Strangely, when an index is defined, the time spent for creating new types/clusters increases linearly (approximately) over time.

My benchmark performs the following steps, using the Java API with OrientDB 2.1rc4:

add 2 string properties to V (someProperty1, someProperty2)
for 1 to 10 do
    insert 10 new types
    insert 10000 vertices
endfor

Concretely, in each iteration I measure only the time spent to create the 10 new types, in three different case:

  • no index
  • one index defined for someProperty1
  • one index defined for someProperty1 and one index defined for someProperty2

It appears that the time spent for creating new types is constant if no indices are defined. However, with an index, the creation time increases linearly to the number of existing types. If we increase the number of indices, the creation time seems to increase linearly as well. Benchmark

The problem occurs with SB-Tree and Hash indices, unique or not unique. It occurs as well when the clusters are empty (no vertex insertion). Intuitively, I suspect a problem related to index allocation or index rebalacing.

Here is the quick&dirty code I runned for the benchmark: http://benjaminbillet.fr/media/OrientDBDatabaseBenchmarks.java

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
laacommented, Apr 6, 2016

Fixed in 2.2 version

0reactions
laacommented, Sep 24, 2015

Problem of this bug is that we require to flush disk cache in case of class\cluster\index creation. Recently we decided to postpone change which allows to prevent force flush of data which in turn will fix this bug. So I postpone this change to next version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Why is the table index creation time and created b...
Solved: Hi experts, I wanted to check what indexes are defined on a table to see if I can improve query performance.
Read more >
Support for Concurrent Index Creation in Indexing Service
In this blog, we will discuss how the user experience of creating multiple indexes concurrently has been improved.
Read more >
Speed up Index Creation time – SQLServerCentral Forums
Hi all,. Pretty broad question, but does anyone have any tips on how I can improve the speed of the creation of indexes?...
Read more >
densityCut: an efficient and versatile topological approach for ...
Results: This article introduces densityCut, a novel density-based clustering algorithm, which is both time- and space-efficient and proceeds as follows: ...
Read more >
The Global Competitiveness Report 2006–2007 - weforum.org
Technological advances have created new opportunities for businesses against the background of an increasingly complex global economy, while reductions in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found