What you do is basically a hash join between the 650K nodes to match the single
n node.
This is a better way, please try.
> START
> n=node(6494)
> MATCH n<-[:`host`]-x
WHERE x.allContent =~ ".*Adobe.*"
>
> RETURN
> count(DISTINCT x) as count
which only goes over the relationships of node n and checks the nodes on the
other side if they have Adobe in their "allContent" field.
Michael
> Am 07.07.2015 um 20:14 schrieb [email protected]:
>
> Hi, i'm using version Neo4j 1.9 version and i'm running in to several
> performance issues in a db with 1M nodes.
>
> First problem is with fulltext indexing, for me this should be very fast but
> for example this query:
>
> START
> n=node(6494), x=node:fulltext_index("allContent:Adobe")
> MATCH n<-[r:`host`]-x
> RETURN
> count(DISTINCT x) as count
>
> is taking 497 secs the first time and 102 secs the second time, and the count
> is just 32 nodes. I have aroung 650k nodes of type "x"
>
> Also I'm having some issues sorting that "x" type. This query:
>
> START
> n=node(1133)
> MATCH
> n<-[r:domainType]-x
> WITH DISTINCT x
> RETURN ID(x) as nodeInstance
> ORDER BY ID(x)
> LIMIT
> 10
>
> is taking 4 or 5 secs. If I remove the ORDER BY clause it takes 20ms.
>
> Is there anything I'm doing wrong. What can I do to improve them?
>
> Thanks,
> Matias.
>
>
>
> --
> 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]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout
> <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.