Hello, I've done a lot of RDBMS performance tuning. Just a few quick thoughts.
Be sure to run the queries in the shell, if you are not already doing so. How many rows are returned? Just sorting, then returning many rows, takes a long time to scroll them to output. If you are getting duplicates, it may be the equivalent of a cartesian product, one of the worst things that can happen in RDBMS, and also one of the least known. See my presentation on them here: http://rodgersnotes.wordpress.com/2010/09/15/stamping-out-cartesian-products/ Try: return p, count (*) order by count(*) Without me looking at the raw data, and the query result, you seem to have many operations going on. So, you have a lot of rows in the profile output. As a general rule, the more rows there are in the profile, the slower the response time is. ie. the more complex the query, the slower it is. If I were looking at this, I would try to isolate which part of the query is the slow part. The Return clause, or the Match clause? You've already tried the response times with the data. Try to simply: return count(*) . How many seconds response time is that, versus the original query? What is the resulting profile? See also the tuning presentations I've done: http://rodgersnotes.wordpress.com/2010/09/14/oracle-performance-tuning/ http://rodgersnotes.wordpress.com/2014/06/08/tuning-the-untunable-when-indexes-and-optimizer-dont-help-2/ They are quick reads. I've put a number of principles and principles in there, that you might apply. ie. Could you create the NEO4J equivalent of a temp table? Hope this helps. On Thursday, October 9, 2014 2:41:47 AM UTC-5, gg4u wrote: > > Hi Micheal, thank you. > sure I post my profile result here below ! > > >> -- 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.
