I have a query that matches few nodes each time it runs.This query runs around 50,000 times in my program.After which I have designed a loop to delete the nodes that i have matched in a separate query .Each match and delete query is within a block of code that runs around 50,000 times.Considering I have created indexes for all the nodeLabels on the property that i am using to query the nodes,how will the presence of a query affect performance. After testing it for myself I have observed that time taken for the program to run is more after index creation when compared to running it before the creation of index. Is this possible? Shouldn't indexes improve the performance.
I have read that range indexed work internally using a BTree.Does the BTree get modified after each delete? Is that the reason for time increase?
If I understand you correctly, you are measuring the performance of the
MATCHand theDELETEof the matched nodes. As it says in the docs here, that shouldn't be surprising, as indexes will slow down writes: