# Enable auto-indexing for nodes, default is falsenode_auto_indexing=true
# The node property keys to be auto-indexed, if enablednode_keys_indexable=_type, name, lastname, no, accountNo, balance, lastTransactionTime
# Enable auto-indexing for relationships, default is falserelationship_auto_indexing=true
# The relationship property keys to be auto-indexed, if enabledrelationship_keys_indexable=_type, amount, time, date, lastTransactionDate, lastTransactionTimeHiI am new to Neo4j and trying to simulate database of a Bank.In my database, i have 100 accounts, which are owned by 100 customers via "owns" relationship.There are randomly generated ~3000 money transfers among these 100 accounts. Represented by "transaction" relationship.What i want to do is to identify all potential fraudelent money transfers.START n = node:node_auto_index(_type="account")MATCH p = n-[r1:transaction]-p1-[r2:transaction]->mWHERE r1.clerk = r2.clerkand r1.date <= r2.date and r1.time <= r2.timeand r2.date - r1.date <= 10and (((r1.amount >= r2.amount * 0.9) and (r1.amount <= r2.amount * 1.1))or(r2.amount >= r1.amount * 0.9) and (r2.amount <= r1.amount * 1.1))return n, r1, p1, r2, m
First; How should i model transation times? Currently i use it as "r.date = 20130401"I want to be able to query according to time intervals.Second; The query above works slow. It takes 5 seconds to run. How can i speed it up.Third; Would neo4j still run slow if i want to run the query above on 10 million transactions? Is accessing so many nodes is a problem that no database can handle, even neo4j?My configurations are like below;# Initial Java Heap Size (in MB)#wrapper.java.initmemory=4096# Maximum Java Heap Size (in MB)#wrapper.java.maxmemory=4096If you need any metrics for further inspection, first you should try to explain me how to get them :)Last question;start a1 = node (16124), a2 = node(16147)
return r
match
a1-[r:transaction*10]->a2
On the same small database, this query takes forever to run. What could be the problem?Thanks alot!
set binPath="%javaPath%\bin\java.exe -XX:+UseNUMA -Xmx4096M -server -XX:+UseConcMarkSweepGC ....//rest is untouched
--
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
start a1 = node (16124), a2 = node(16147)
match
shortestPath(a1-[r:transaction*..10]->a2)
On the same small database, this query takes forever to run. What could be the problem?Thanks alot!
<graph.db.rar>
-server -D64 -Xms4096M -Xmx4096M -cp D:\Swf\DB\Neo4j\neo4j-enterprise-1.8.2\lib\neo4j-kernel.jar;D:\Swf\DB\Neo4j\neo4j-enterprise-1.8.2\jta.jar -Xss2048k -XX:SurvivorRatio=9 -XX:TargetSurvivorRatio=90 -XX:+UseParNewGC -Xloggc:"C:\Users\Emre KISA\Desktop\gc.txt" -XX:+PrintGCDetails
Hi,
Am Montag, 29. April 2013 22:39:03 UTC+2 schrieb K. Emre KISA:HiI am new to Neo4j and trying to simulate database of a Bank.In my database, i have 100 accounts, which are owned by 100 customers via "owns" relationship.There are randomly generated ~3000 money transfers among these 100 accounts. Represented by "transaction" relationship.What i want to do is to identify all potential fraudelent money transfers.START n = node:node_auto_index(_type="account")MATCH p = n-[r1:transaction]-p1-[r2:transaction]->mWHERE r1.clerk = r2.clerkand r1.date <= r2.date and r1.time <= r2.timeand r2.date - r1.date <= 10and (((r1.amount >= r2.amount * 0.9) and (r1.amount <= r2.amount * 1.1))or(r2.amount >= r1.amount * 0.9) and (r2.amount <= r1.amount * 1.1))return n, r1, p1, r2, m
Did you consider using an alternative way to model this information? A possible approach could be to store transactions as a time sorted linked list and use that to only query relevant time windows.Additionally it might be worthwhile to keep track of which transactions have been issued by the same clerk directly in the graph. To achieve this, you could even have a relationship type per clerk and sort transactions of the same clerk in a linked list by time.The fraud detection could then navigate from each clerk to the set of relevant transactions in a time windows and just check if they touch the same accounts.If you just want to generate reports this has the benefit of being easily parallelizable per clerk.Cheers,Stefan