0

我想获得标签的最大位置 ID。

但是,跟踪查询非常慢。

agens=# match (n:v) return max(graphid_locid(id(n)));
 max 
-----
 6
(1 row)

如何在 AgensGraph 上更快地获取标签的最大位置 ID?

4

1 回答 1

0

从 pg_sequences 表中获取相关的序列值。

agens=# select start_value from pg_sequences where schemaname = 'graph' and sequencename = 'v_id_seq';
 start_value 
-------------
           6
(1 row)
于 2019-07-31T05:44:41.307 回答