Joey
03/17/2022, 12:08 PMJoey
03/17/2022, 12:08 PMJoey
03/17/2022, 12:09 PMJoey
03/17/2022, 12:09 PMJoey
03/17/2022, 12:09 PMJoey
03/17/2022, 12:15 PMwilliamdclt
03/17/2022, 12:15 PMJoey
03/17/2022, 12:15 PMJoey
03/17/2022, 12:15 PMwilliamdclt
03/17/2022, 12:17 PMwilliamdclt
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 DBJoey
03/17/2022, 12:22 PMJoey
03/17/2022, 12:22 PMwilliamdclt
03/17/2022, 12:29 PMwilliamdclt
03/17/2022, 12:30 PMdocker build .
should be good enough rightecordell
03/17/2022, 12:33 PMalter database <yourdbname> set plan_cache_mode to force_custom_plan;
williamdclt
03/17/2022, 12:36 PMwilliamdclt
03/17/2022, 12:42 PMwilliamdclt
03/17/2022, 12:46 PMbalchu
03/17/2022, 12:47 PMplan_cache_mode
can be passed as a connection string?balchu
03/17/2022, 12:51 PM--datastore-conn-uri="postgres://postgres:password@localhost:5432/spicedb?sslmode=disable plan_cache_mode=force_custom_plan
?ecordell
03/17/2022, 1:00 PMoptions='-c plan_cache_mode=force_custom_plan'
to set the value for the session when you connect (or just use a SET
after connect)williamdclt
03/17/2022, 1:00 PMwilliamdclt
03/17/2022, 1:01 PMpostgresql.conf
balchu
03/17/2022, 1:02 PMecordell
03/17/2022, 1:07 PMwilliamdclt
03/17/2022, 1:08 PMwilliamdclt
03/17/2022, 1:19 PMtimestamp
as a param, that's going to be a problem. The only other option I see is sanitising the timestamp and injecting it into the query dynamicallyJoey
03/17/2022, 1:28 PM