When trying to find list of users that startsWith some text example :
g.V().hasLabel('user').has('username', startingWith('m')).limit(12).values('username'); //4 Seconds
g.V().hasLabel('user').has('username', startingWith('madyan')).limit(12).values('username'); //2 Minutes
The more letters we are searching for the slower it gets, why is that ? And how can we optimise the query, 2 Minutes is just very high ?