what's the use case? the snapshot
# spicedb
y
what's the use case? the snapshot parameters are txids, so you'd choose a snapshot txid after the created txid of a relation you're interested in for $1 and the max txid (indicating that the relation is still present) for $3
w
The snapshot params are `pg_snapshot`s, not xid, I don't know how to get a realistic pg_snapshot! The use-case is simply to be able to investigate a high CPU usage on my database coming from this query. There's indexes in place but I'd like to think about whether they can be improved somehow
y
oh interesting 🤔 yeah i haven't dug that far in. i'd be curious how the query caller can even be aware of a snapshot unless the value itself is also computed?
j
the "simplest" approach is to just call the HeadRevision in SpiceDB and grab the revision object to get its snapshot parameter
do that once and it should be fine for the duration of the GC window