Why doesn't OrientDB use indexes to search with the "LIKE" operator?

I found that OrientDB is too slow (at least much slower than Neo4j) even on relatively small (150K) datasets when searching for records in text, despite having indexes.

For example, I have both UNIQUE and FULLTEXT indexes for the "username" property, but as shown below OrientDB does not use.

orientdb> explain select username from P where username like 'log%' Profiled command '{current:#10:152060,documentReads:152061,documentAnalyzedCompatibleClass:152061,recordReads:152061,elapsed:6.5357623,resultType:collection,resultSize:88}' in 6,537000 sec(s): { "@type": "d", "@version": 0, "current": "#10:152060", "documentReads": 152061, "documentAnalyzedCompatibleClass": 152061, "recordReads": 152061, "elapsed": 6.5357623, "resultType": "collection", "resultSize": 88, "@fieldTypes": "documentReads=l,documentAnalyzedCompatibleClass=l,recordReads=l,elapsed=f" } 

Is there a way to speed up the search for patterns in OrientDB?

+4
source share
1 answer

To use the full-text index, you must use the containsstext operator, for example:

 explain select username from P where username containstext 'log' 

or try the following:

  explain select username from P where username >= 'log' and username < 'loh' 
+7
source

All Articles