Is there any downside to use Integer instead of Date because of cypher ? (Performance wise) #1598
-
Hello, We mostly use cypher requests on our project, Cypher doesn't support date comparison, for example this : SELECT * FROM NER_Date WHERE date > '1995-02-02'; We can still create date type in cypher by firstly creating the vertex type in SQL create vertex type NER if not exists;
create property NER.name if not exists string;
create property NER.identity if not exists string;
create property NER.subtype if not exists string;
CREATE VERTEX TYPE NER_Date EXTENDS NER
create property NER_Date.date if not exists DATE; And when you run in cypher create (n:NER_Date{date:'1996-12-12', identity: 'Douze novembre 96'}) return n It's not a string, but as expected a Now, the idea is that if we want to stick with Cypher, we can convert in python (our backend) the date to an unsigned 64bit integer, send it to the database for creation, and when we do queries, do the same conversion. You may agree on me that it's kind of innapropriate. But at the end of the day, if it works, it works. Here is my question :If we don't use Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't think it's a bad idea. Afterall, ArcadeDB stores the dates as long internally ;-) |
Beta Was this translation helpful? Give feedback.
I don't think it's a bad idea. Afterall, ArcadeDB stores the dates as long internally ;-)