graph/db+sqldb: find best default query cfg values for sqlite & postgres

This commit adds a BenchmarkFindOptimalSQLQueryConfig test in the
graph/db package which runs ForEachNode and ForEachChannel queries
against a local backend using various different values for the sql
QueryConfig struct. This is done to determine good default values to
use for the config options for sqlite vs postgres.
This commit is contained in:
Elle Mouton
2025-08-11 13:09:01 +02:00
parent 185166b8d3
commit 6a31e06817
5 changed files with 162 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ func NewTestDBWithFixture(t testing.TB,
store, err := NewSQLStore(
&SQLStoreConfig{
ChainHash: *chaincfg.MainNetParams.GenesisHash,
QueryCfg: sqldb.DefaultQueryConfig(),
QueryCfg: sqldb.DefaultPostgresConfig(),
}, querier,
)
require.NoError(t, err)