Closed nicolamassarenti closed 3 years ago
@nicolamassarenti one way you could speed up such a query is add a limit
clause:
match $x isa token, has property "token-property"; limit 1;
Then, as soon as a single entity is found, the query would terminate and return a result
This question is more appropriate to be posted in the discussion forum or in the community chat, @nicolamassarenti. GitHub issues are for feature request or bug reports. I will close this now.
Hi,
I wanted to write a query to check if exists at least a thing (entity or relation) in my typeDB but I could find any way of doing that.
The workaround I found is the following query:
then, if count > 0, it means that it exists at least a token. I believe that this query is inefficient because it has to search all the entities/relations in my DB. I wonder if exists a more efficient way of getting the same result, may with something like:
that returns the result as soon as it discovers the first
match
.Do you have any suggestions?