PRIMARY KEY advantages?

I am in the process of defining a graph schema. And in the documentation two options were offered at the time of defining the equivalent ot a primary key on a SQL: to use PRIMARY KEY (which already includes the key in the attributes) or to use the PRIMARY_ID WITH primary_id_as_attribute=“true” clause. The main disadvantage of using the first one is that it is not supported in GraphStudio and thus, only CLI can be used for development. My question is: is there any advantage in terms of performance on the first option? Thanks in advance.

There should be no performance difference.
PRIMARY_ID is our original syntax and functionality, with the primary_id_as_attribute parameter as a later addition to allow you to search on the id field (you can’t search on our “classic” primary_id). Under the hood, it is actually replicating the field: there is an id field plus a searchable attribute field.

PRIMARY KEY is some syntax sugar to make the above seems more like traditional SQL, but it’s really the same as above. We simply haven’t gotten around to closing the loop on having GraphStudio fully handle the back and forth with this syntax sugar.

1 Like

I will try to use PRIMARY-ID thus, nice to know it. Thanks!!