If I issue a merge, I’m guessing that is just executed at that time, it’s not something like a match that will sit in the back ground and continuously run?
What versions of Neo4j. Your initial post with the methods to determine is ‘true’ but only so much as what version of Neo4j you are running. For Neo4j 2025.x see Manage queries - Operations Manual which states
List all running queries
The procedure for listing queries, dbms.listQueries(), is replaced by the
command for listing transactions, SHOW TRANSACTIONS. This command
returns information about the currently executing query in the
transaction. For more information on the command, see the Cypher
manual → SHOW TRANSACTIONS command.
As to MERGE since MERGE is a update or create, for an update to occur it needs to lock the object 1st. But if some other cypher currently has the object locked, then the MERGE will wait until the lock is acquired.
Not sure what you mean about “match statements configured?” You used match/merged to create your graph. The graph is the artifact. There isn’t a match configuration that results. What is your objective?
So pretty much after any/all CREATE or MERGE’s the desired MATCH statements needs to be rerun to create the new edges thats available based on the new nodes.
You create nodes and edges with cypher queries using create, match, and merge. You then use match to find the entities you need for your analysis. The key is you use patterns to match the entities and relationships you want when querying to data.
MATCH (bank:Bank)
MATCH (acc:Account)
WHERE bank.fspiId = acc.fspiId
MERGE (bank)-[:OWNS]->(acc);
then going onto web console and asking for it to show me edges shows me the edges/links created due to the above. implying it creates a process that says when i ask for
MATCH p=()-[]->() RETURN p ;
It then returns the MATCHES as defined above, which is persisted some where as a match that i want defined.
So part of my query is, if i now add new records to say the above Account node. if I then execute
MATCH p=()-[]->() RETURN p ;
would they show… or do i need to rerun
MATCH (bank:Bank)
MATCH (acc:Account)
WHERE bank.fspiId = acc.fspiId
MERGE (bank)-[:OWNS]->(acc);
to discover / mark / create the edges, to be shown when i execute
that will now show me the 5 banks and the 15 people.
I i now add a 6th bank…
and rerun MATCH p=()-[]->() RETURN p ;
will it show the remaining 5 people matched to the 6th bank or do i first need to run the
MATCH (bank:Bank) // this first three lines
MATCH (acc:Account) // return ANY 2 nodes bank and acc
WHERE bank.fspiId = acc.fspiId // where the fspiId is equal
MERGE (bank)-[:OWNS]->(acc); // then merges an edge [:OWNS] on all of those pairs
and can then run MATCH p=()-[]->() RETURN p ; to see the links having been ?
If you add a Node and don’t add relationships, then the specific match from your query will not return anything (that is returning nodes that are connected to other nodes).
so execution time. how does it know only to scan new nodes and do a update for them and not scan all nodes. otherwise this gets more expansive the bigger the deployment.
I think perhaps the confusion arises from the fact that in ERD/SQL, there is a concept of a foreign key, meaning that the “edge” from one table to another is constrained by that key, and in the diagram, it appears as an edge.
Here, you have to be more explicit; there are “constraints” for nodes, but those are introspections (“property existence/uniqueness/type/identifier”).
Your nodes will have indices - the labels like:Account or :Bank are a type of index (same with the edges [:own], etc) … you can then specify your own (like fspiId will have a uniqueness constraint for a bank, and an index to scan the space for that property faster).