Haensel/Neo4Yii — Issue #5: bad performance of findAll() method
Author: Haensel
Created: 2012-03-09 14:11:09+00:00
State: open

Currently, the findAll() method (and the findByAttributes() method) is iterating over all nodes/relationships when used in order to find the corresponding nodes/relationships of a given class (e.g.: modelclass:Person). The reason is the current gremlin query used: "g.V.filter{it.modelclass=="Person"}". The bigger the graph the longer the query takes.

Possible solution: Automatically add each node to its corresponding index (e.g.: person index) and use this index for lookups with Person::model()->findAllByExactIndexEntry($this->getModelClassField(),get_class($this),$this->indexName())