Hi,

My application is running on OrientDB v2.1.8, the Contact table consists of 
1000002 rows.

I have tried many way to write a Count query but the performance is a pain 
at this point.

SELECT count(*) FROM Contact WHERE (Account = #20:1) AND (EntityInfo.State 
= 0)
=> Query executed in 25.481 sec. Returned 1 record(s) => 100000

SELECT count(*) FROM Contact WHERE (Account = #20:1)
=> Query executed in 24.245 sec. Returned 1 record(s) => 100000

SELECT count(@this[Account = #20:1]) FROM Contact
=> Query executed in 32.727 sec. Returned 1 record(s) => 100000

SELECT count(*) FROM Contact
=> Query executed in 0.279 sec. Returned 1 record(s) => 1000002


Here under is the Contact class and Index on this class



Any help will be very appreciated!

My Best,
Hung Tran

-- 

--- 
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