You should create an index for your label/property combo.

Something like:

try ( Transaction tx = graphdb.beginTx() )
{
    graphdb.schema()
            .indexFor( DynamicLabel.label( "MyLabel" ) )
            .on( "myProperty" )
            .create();
    tx.success();
}

Wes

On Fri, Mar 28, 2014 at 6:55 PM, José Cornado <[email protected]>wrote:

> findNodesByLabelAndProperty searches a whole graph. At this point is not
> important because mine is tiny.
>
> But as it grows this function becomes slower. I can pinpoint the root node
> from which all the nodes that match the function's criteria. So the
> question is:
>
> is there a way to feed findNodesByLabelAndProperty an starting node?
> (cypher seems to be an overkill)
>
> a workaround would be to split the graph in different directories so
> findNodesByLabelAndProperty doesn't wander around. But this has the cost
> of diferent embedded instances.
>
> any suggestions?
>
> thanks a lot!!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to