Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
137319: vecstore: implement partition manipulation functions r=mw5h a=mw5h Stub out the persistent storage vecstore implementation. Implement the methods for partition creation, retrieval and deletion. Add a simple test to ensure that these functions work properly. 137426: sql: make memo.IsStale more efficient when schema objects aren't modified r=fqazi a=fqazi This patch speeds up memo staleness checks for prepared statements by: 1. Updates the lease manager to expose a generation ID which allows you to know if any descriptors changed 2. Updates the table stats cache to add a generation ID to determine if any new stats were added 3. Updates the IsStale check to confirm if either the generation IDs have changed, zone configs, search_path, changed or current database has changed. If everything was the same in the last execution, the full CheckDependencies can be skipped. This is only used for prepared statements. 5. Updates the schema changer logic to lease new descriptors if the schema is already leased. This allows invalidation to work within a search path if new objects are made. Fixes: #105867 Numbers from sysbench (before these changes) using `rpsak.sh repeated`: ``` Before the changes (geomean TPS): 1121.75 After the changes (geomean TPS): 1165.47 Before the changes (geomean QPS): 22435.06 After the changes (geomean QPS): 23309.41 Percent improvement: 3.89% ``` Also from the sysbench workload numbers (from `@tbg)` write_only: ``` benchdiff --old lastmerge ./pkg/sql/tests -b -r 'Sysbench/SQL/3node/oltp_write_only' -d 1000x -c 10 name old time/op new time/op delta Sysbench/SQL/3node/oltp_write_only-24 4.38ms ± 1% 4.23ms ± 1% -3.38% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Sysbench/SQL/3node/oltp_write_only-24 935kB ± 6% 933kB ± 6% ~ (p=0.739 n=10+10) name old allocs/op new allocs/op delta Sysbench/SQL/3node/oltp_write_only-24 6.08k ± 2% 6.04k ± 3% ~ (p=0.060 n=10+10) ``` read_only: ``` benchdiff --old lastmerge ./pkg/sql/tests -b -r 'Sysbench/SQL/3node/oltp_read_only' -d 1000x -c 10 test binaries already exist for d2bd29e: Merge #137750 test binaries already exist for 3cc7a6c: sql: add avoid_catalog_generation_for_staleness to pkg=1/1 iter=10/10 cockroachdb/cockroach/pkg/sql/tests \ name old time/op new time/op delta Sysbench/SQL/3node/oltp_read_only-24 7.88ms ± 1% 7.44ms ± 2% -5.62% (p=0.000 n=10+10) name old alloc/op new alloc/op delta Sysbench/SQL/3node/oltp_read_only-24 1.20MB ± 4% 1.19MB ± 5% ~ (p=0.353 n=10+10) name old allocs/op new allocs/op delta Sysbench/SQL/3node/oltp_read_only-24 4.71k ± 3% 4.64k ± 3% -1.48% (p=0.022 n=10+10) ``` Co-authored-by: Matt White <matt.white@cockroachlabs.com> Co-authored-by: Faizan Qazi <faizan@cockroachlabs.com>
- Loading branch information