Speeding up query

Hi,

are there some solutions for my query below to speed up?

match (a:keyWord{kwValue:'zhou'}),(s:Product)
using scan s:Product
where s.seriesCode in ['110300027060','221000058301','110300107740','110300026540','110300027150','110300026720','110300107560','221005089502']
with a,s
match (a)-[:found]-(user:User)-[:view]-(s)
with user,s
return s,count(user) as foundView

Profile

Best wishes
Grant

Read this

Share your PROFILE output.

Do you have an index/constraint on :keyWord(kwValue) ? and one on: :Product(seriesCode)

  • Remove the using scan
  • Add directions to your relationships.
  • remove the withs
  • use parameters

Thanks, im going to try these solutions.