Somehow your query is not showing correctly. Can you send them again? And check that they render correctly?
Are you using Neo4j enterprise? And what is your machine setup + memory config How big is your db on disk? I would filter out nodes (customers) above and below a certain view count. Do you have indexes / constraints on :Product(idProduct) and :Customer(idCustomer) ? On Mon, Mar 5, 2018 at 2:37 PM, Rodrigo Lacerda <r.lacerd...@gmail.com> wrote: > Hello! > > I need help with a query that is very slow. > > My data models: > > 2379k categories (vertex) > 1746315k users (vertex) > 376900k products (vertex) > > 40m views (client -> view (date) -> product) > 2m belong (product -> belong -> category) > > I want to display recommendations from "Who view also view: > > I have two basic queries, one with category filter and one without. > > Query without filter: > MATCH (p: Product {idProduct: "178293"}) <- [: VIEW] - (c: Customer) - [: > VIEW] > RETURN rec.idProduct AS recommendation, COUNT (*) AS views > ORDER BY views DESC LIMIT 25 > > It's taking about 10 seconds to run. > > Query with filter: > MATCH (p: Product {idProduct: "178293"}) <- [: VIEW] - (c: Customer) - [: > VIEW] "173"}) > RETURN rec.idProduct AS recommendation, COUNT (*) AS usersWhoAlsoWatched > ORDER BY usersWhoAlsoWatched DESC LIMIT 25 > > It's taking about 60 seconds to run. > > I would like to receive some tips to tune this query. > > Thank you! > > -- > 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 neo4j+unsubscr...@googlegroups.com. > 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 neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.