williamdclt
03/17/2022, 12:18 PMnow 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