arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

Simple CYPHER query is much slower than SQL one on vector sample database (only name query with limit=25)

Open ExtReMLapin opened this issue 10 months ago • 0 comments

Hello,

Version used :

 [ArcadeDBServer] <ArcadeDB_0> ArcadeDB Server v25.1.1 (build b1c737224fcab342eb60c36469cde61e0bb20271/1737875480429/main) is starting up...
 [ArcadeDBServer] <ArcadeDB_0> Running on Linux 6.8.0-49-generic - OpenJDK 64-Bit Server VM 17.0.13

Issue :

We would expect

match (n:Node) return n.name

to be as fast as

SELECT nodeOBJ.name AS name
		  FROM (MATCH {type: Node, as: nodeOBJ}
		  RETURN nodeOBJ)

But Cypher (with limit 25) takes 5.7s

Image

And SQL takes 6ms

Image

All records in SQL takes ~4s

Image

DB Imported from guide :

import database https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.en.300.vec.gz
  with distanceFunction = 'cosine', m = 16, ef = 128, efConstruction = 128;

ExtReMLapin avatar Feb 17 '25 10:02 ExtReMLapin