git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 417fefa) | patch
Improve scalability of md.c for large relations.
Fri, 9 Sep 2016 00:02:43 +0000 (17:02 -0700)
Fri, 9 Sep 2016 00:18:46 +0000 (17:18 -0700)
commit 45e191e3aa62d47a8bc1a33f784286b2051f45cb
Improve scalability of md.c for large relations.

So far md.c used a linked list of segments. That proved to be a problem
when processing large relations, because every smgr.c/md.c level access
to a page incurred walking through a linked list of all preceding
segments. Thus making accessing pages O(#segments).

Replace the linked list of segments hanging off SMgrRelationData with an
array of opened segments. That allows O(1) access to individual
segments, if they've previously been opened.

Discussion: <20140331101001.GE13135@alap3.anarazel.de>
Reviewed-By: Peter Geoghegan, Tom Lane (in an older version)
src/backend/storage/smgr/md.c diff | blob | blame | history
src/backend/storage/smgr/smgr.c diff | blob | blame | history
src/include/storage/smgr.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /