Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-30-2021 12:17 PM
hi, i have a problem with this quary:
match(n:Reato), (m:Reato) where n.Id > m.Id with toInteger(apoc.text.jaroWinklerDistance(n.totale, m.totale) * 100) as sim1,toInteger(apoc.text.distance(n.totale, m.totale) * 100) as sim2 where sim1 > 85 create (n)-[f:SIMILE{sim1:sim1, sim2:sim2, dist:abs(sim1-sim2), media:(sim1 + sim2)/2}]->(m)
totale is a text
In my database there are 1260 "Reato", so when i start the quary my pc can't process all these data.
How can i divide the quary in 3 or 4 parts in order to lighten the work of my pc (macBook air)?
10-04-2021 08:25 AM
Hi @lorenzo.braglia99 !
I think the main problem is the WHERE condition, there's lots of comparisons to be made, in fact you are probably gathering and inspecting the whole database 1260 times. I would recommend to run an explain first to see what the execution plan is doing. Also, I have a few questions to understand the problem:
Have you tried using indexes on id? Indexes could fasten the comparisons.
Do you have the default values on memory heap size? You could try to tweak this values to your need.
Could you explain a bit more of your use case? Maybe there's another way to approach the problem.
Hope this helps. Cheers!
All the sessions of the conference are now available online