aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeProjectSet.c
diff options
context:
space:
mode:
authorJohn Naylor <john.naylor@postgresql.org>2022-08-03 09:59:28 -0700
committerJohn Naylor <john.naylor@postgresql.org>2022-08-11 09:17:42 +0700
commit37a6e5df3713498a21942dae2ed3122bba5b9f50 (patch)
treebbcf0b95eb0a86aa9b49cf8ef23bbfcac6d0843f /src/backend/executor/nodeProjectSet.c
parenta8c012869763c711abc9085f54b2a100b60a85fa (diff)
downloadpostgresql-37a6e5df3713498a21942dae2ed3122bba5b9f50.tar.gz
postgresql-37a6e5df3713498a21942dae2ed3122bba5b9f50.zip
Optimize xid/subxid searches in XidInMVCCSnapshot().
As reported by Yura Sokolov, scanning the snapshot->xip array has noticeable impact on scalability when there are a large number of concurrent writers. Use the optimized (on x86-64) routine from b6ef16756 to speed up searches through the [sub]xip arrays. One benchmark showed a 5% increase in transaction throughput with 128 concurrent writers, and a 50% increase in a pathological case of 1024 writers. While a hash table would have scaled even better, it was ultimately rejected because of concerns around code complexity and memory allocation. Credit to Andres Freund for the idea to optimize linear search using SIMD instructions. Nathan Bossart Reviewed by: Andres Freund, John Naylor, Bharath Rupireddy, Masahiko Sawada Discussion: https://postgr.es/m/20220713170950.GA3116318%40nathanxps13
Diffstat (limited to 'src/backend/executor/nodeProjectSet.c')
0 files changed, 0 insertions, 0 deletions