https://authzed.com logo
#spicedb
Title
# spicedb
w

williamdclt

03/17/2022, 12:18 PM
as an aside, it seems that SpiceDB makes a first call to the DB to get the
now
value (L521), then computes the
timestamp
to query in go-land, then makes this
SELECT MIN(id), MAX(id) from rttx WHERE timestamp <= $1
query with the computed timestamp. It could instead query
SELECT MIN(id), MAX(id) from rttx WHERE timestamp <= now() - interval $1
, and avoid a round-trip to the DB