I have nodes with properties as follows:
- uid: this mongo object ID string.
- typeName: a regular string field.
I have created the following indexes:
create index on :Document(uid) create index on :Document(typeName) create index on :Document(uid, typeName)
Now the issue I am facing is when I try to run the following query, its very slow with all the indexes in place.
profile match (doc1:Document)-[*]->(doc2:Document) where doc1.uid = "58ad88227faf733d28c8c4ee" and doc2.typeName = "Disease" return doc2
Once I drop the following indexes and retain the
typeName index the same query runs blazing fast.
drop index on :Document(uid) drop index on :Document(uid, typeName)
Seems like when it tries to use the uid index its slowing things down. Why would that be.