I need query cluster's records count with SQL,use “selec count(*) from foo where @rid like '#10:%' ” is fine in little data. But in big data , will be very slow
1.I have about 1,000,000 record In foo
selec count(*) from foo where @rid like '#10:%'
and I got this result
Query executed in 35.095 sec. Returned 1 record(s)
Any suggestions ?
Hi @robben766
The right syntax is following:
SELECT count(*) FROM cluster:10
Thanks
Luigi
Thanks
I want to query multiple clusters. What should the syntax look like?
You can do it as follows, but it only works with cluster names (not with cluster IDs)
select count(*) from cluster:[countries,countries_1]
Thanks
Luigi
Thanks
@luigidellaquila Where is the document address of the the syntax? I didn't see the above syntax in the document.
Hi @yczhaoDevelop
You are right, this page https://orientdb.com/docs/2.2.x/SQL-Query.html only reports the cluster:clustername syntax, not the cluster:clusterId, I'm updating it now
Thanks
Luigi
Most helpful comment
You can do it as follows, but it only works with cluster names (not with cluster IDs)
Thanks
Luigi