简体   繁体   中英

How to get max location id of label more faster on AgensGraph?

I want to get largest location id of label.

But, It is very slow on follow query.

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

How to get max location id of label more faster on AgensGraph?

Fetch related sequence value from pg_sequences table.

agens=# select start_value from pg_sequences where schemaname = 'graph' and sequencename = 'v_id_seq';
 start_value 
-------------
           6
(1 row)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM