Skip to content
Snippets Groups Projects
Commit eddf8fc4 authored by Stefan Braß's avatar Stefan Braß
Browse files

Merge branch 'master' of gitlab.informatik.uni-halle.de:brass/rbench

New Table BENCH_COST
parents a0093c6a de610f4a
No related branches found
No related tags found
No related merge requests found
prefix : <http://example.org/stuff/1.0/>
SELECT (count(*) as ?resultcount) WHERE {?a :par / :par ?b}
MATCH (n)
DETACH DELETE n;
LOAD CSV FROM 'file://INSTANCE' AS line
MERGE (a:Node {n: toInteger(line[0])})
MERGE (b:Node {n: toInteger(trim(line[1]))})
CREATE (a)-[:PAR]->(b);
MATCH (a)-[:PAR]->(t)-[:PAR]->(b)
RETURN COUNT(DISTINCT [a,b]);
......@@ -4,9 +4,9 @@ drop table if exists par;
SET work_mem TO '1 GB';
create TEMPORARY table par(x integer not null, y integer not null);
create TEMPORARY table par(a integer not null, b integer not null);
\echo 'LOAD DATA'
\copy par from 'INSTANCE';
create index par_y on par(y);
create index par_b on par(b);
//
// par - "parent"/"edge" relation
//
.decl par (n:number, m:number)
.input par(IO=file, filename="INSTANCE")
// par(1,2).
// par(2,3).
//.decl path2 (n:number, m:number) output
.decl path2 (n:number, m:number)
//.output path2(IO=stdout)
.printsize path2
path2(X, Y) :- par(X, Z), par(Z, Y).
WITH path2(a,b) AS (
SELECT DISTINCT p1.a, p2.b from par p1 JOIN par p2 ON p1.b = p2.a
) SELECT Count(*) FROM path2;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment