orientdb: Incorrect result from count query
OrientDB Version: 2.23
Java Version: 1.8.0
OS: freeBSD 10.3
I have encountered strange result during “count” query. Im not sure if this is actual bug or just my misunderstanding.
Expected behavior
count * and count rid should have equal number.
Actual behavior
These queries are in 2.2.23.
select count(@rid) from transactions - 792743
select count(*) from transactions - 1276958
I thought rid can never be null ? I even check if there is any record that rid is NULL but there is none.
select * from transactions where @rid is NULL - nothing
Then I realized we just upgraded ordb from 2.2.4 to 2.2.23. So I went back to query in 2.2.4 if it works correctly.
select count(*) from transactions - 1276958
select count(@rid) from transactions - 810532
Notice count(rid) result from v2.2.4 is not even equal to result from v2.2.23.
–
Steps to reproduce
I don’t know how this happen.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 46 (24 by maintainers)
@Bankde
check databasealso should check database consistency if you use a distribution from an official site. The output should be like following: