FIND REFERENCES command is not intended to be used in typical production environments.
Links are unidirectional, so to find all the documents that refer to a single RID, OrientDB has to do a full scan of the database, this is operation will take a long time to execute.
We suggest to use FIND REFERENCES only to repair databases where you deliberately deleted records without updating their references.
For normal use cases we suggest to:
- use edges instead of links: edges are bi-directional (no need to execute FIND REFERENCES) and are automatically managed by OrientDB (they are automatically removed when you remove a connected vertex)
- use links only in schemaful, indexed properties, so that you always know where to look for in case you manually remove a linked document
There are no plans to make FIND REFERENCES faster, just because it would imply a huge performance impact on the whole architecture