Comments (7)
I've checked the same queries with Neo4J and it works the same way. Vertices are duplicated also. It is an expected behavior I guess.
from age.
Do you think the following would work? It should not duplicate the vertices.
MERGE (n:Person {name:'abc'}) -- creates the start vertex if does not exist
MERGE (m:Person {name:'xyz'}) -- creates the end vertex if does not exist
MERGE (n)-[:rel]->(m) -- creates the edge if does not exist
RETURN n
from age.
If all vertices already exist before any edges, can't we just use-
MATCH (vertex1) MATCH (vertex2) CREATE (vertex1)-[:e]->(vertex2)
from age.
Hi Rafsun! The vertices can be created before and then create the edges after. I thought about this solution before, but wouldn't this be O(n) for creating the vertices and then O(2n) to check if the vertices exist to just then create the edge? I've been thinking that this would take quite a while if we consider the total complexity of this operation as O(n + 2n × m) - considering n to be the number of vertices and m the number of edges. I'm also considering that AGE doesn't use indexes on vertices and edges tables.
from age.
Hi @MatheusFarias03 ,
Yes. That makes sense. As for 'duplicate vertices', does the same query also create duplicates in Neo4J? Is it an expected behavior?
from age.
This issue is stale because it has been open 45 days with no activity. Remove "Abondoned" label or comment or this will be closed in 7 days.
from age.
This issue was closed because it has been stalled for further 7 days with no activity.
from age.
Related Issues (20)
- OLTP vs OLAP Graph Querying HOT 5
- Compatibility Query: Running Cloned Apache Age Code on Windows OS? HOT 2
- Flaky test age_global_graph fails on slow machines HOT 4
- unable to pull the docker image with 'latest' tag HOT 8
- Ambiguous column reference error when returning variable used in the RHS of SET clause
- Flaky test cypher_delete fails on slow machines
- GQL Support HOT 2
- Can we improve query performance?
- SET on MERGE not storing edge properties inside the database on creation HOT 1
- Server crashes when using exists(path) with explicit lenght paths HOT 7
- Since there seems to be special requirements for label name, it would be nice to extend a function to verify name correctness HOT 3
- Which quality Postgres hosts allow the AGE extension? HOT 1
- Is there any restriction to support for psycopg2-binary in python driver?
- Performance issues with edge creation for larger dataset with 83K edges HOT 4
- How to extract values of a nested JSON and use in MATCH query, also can we index based on the properties of nested json?
- Replace function "" is needed while using hybrid queries
- How to assign cypher result to pgsql variable? HOT 2
- Is data duplicated in parent and label/edge tables? What are the internals? HOT 2
- Age graph existance check function, something like "graph_exists" would be very nice HOT 7
- Could you please help with example, how to correctly use age_graph_stats function HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from age.