Open dariok opened 2 years ago
For the purposes of comparing timings, it would be advisable to use consistent parameters - so use t1, t2
throughout all examples. The reason is that, as the tuning article states - https://exist-db.org/exist/apps/doc/tuning#selective - performance is expected to change based on how "selective" each filter is in a sequence of filters.
Update: Reading the description a bit more carefully, I see that the not()
filters always return true()
, regardless of the t1, t2
values. So I retract my advice!
Did you change these values so that you could achieve "fresh" timings? Was it necessary to change the t1, t2
values?
I used different values each time to avoid obfuscating the underlying problem – i. e. to get fresh timings, indeed. I am not sure whether some form of caching could actually interfere with the timing but I wanted to make sure this is not the case, hence changing the value each time (so, type 1, run 1 was ('t1', 't2') and the final run for type 4 was ('t31', 't32'))
Did you restart the database when changing the predicates? If not, then eXist's caches from one set of tests may contribute to the subsequent set. To eliminate the cache as a variable, I'd advise to restart when changing a predicate.
Describe the bug There is a difference in execution times between different variants of predicates in a query which should actually be the same.
The following data were measured on a set of c. 4.9 million elements with
@xml:id
. There is an index for@type
. The tests used different values for thenot()
check each time (values in the table below are examples only) which were not used in any location so the resulting set always consisted of 4,880,027 items.[not(@type = ('t1', 't2') and @xml:id]
[not(@type = ('t3', 't4')][@xml:id]
[@xml:id and not(@type = ('t5', 't6')]
[@xml:id][not(@type = ('t7', 't8')]
Several things can be observed here:
Expected behavior While some variance is to be expected, all query times should be roughly the same.
To Reproduce (last run was)
Context (please always complete the following information):
Additional context
conf.xml
? max. RAM to 6G