Hi

I created a test data set of 150,000 films

I include cache counters, such as owns_count, loved_count, watched_count

I'm trying to write the most basic query


SELECT FROM film WHERE owns_count > 0 ORDER BY loved_count DESC

(user has applied a filter to show owned films , and ordered by most loved)

It's taking an unusable 2.5 secs

Removing the where clause or the order by allows the query to execute using 
the indexes (I have one for each counter, and also a composite for all 
three)

Can someone advise why this may be happening? I've tried lots of 
permutations, using LETs, subqueries, reference indexes direct etc but 
cannot get the WHERE and ORDER BY clauses working together well, 
performance always seems to take a hit as it avoids the index on the order.

Thanks



-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to