Peter Geoghegan
pgeoghegan.blogspot.com · Personal blog · on HN since 2011
Peter Geoghegan, a PostgreSQL contributor, writes about database internals such as sorting, index bloat, JSONB, and building Postgres with Clang.
What HN saysHN links it for PostgreSQL performance details. Commenters cite his posts on faster sorting with abbreviated keys in 9.5, Clang builds, and JSONB.
17HN people shared it
8linked it in comments
16stories submitted
242story points
8 years agolast shared
2011people per year2026
Most-shared posts
- 1PostgreSQL Index bloat under a microscope4 people · 10 points · first shared 2017 · discussion on HN
- 2Exploiting locality to improve PostgreSQL's text sort performance3 people · 3 points · first shared 2015 · discussion on HN
- 3Could Clang displace GCC generally? Part II: Performance of PostgreSQL binaries2 people · 1 points · first shared 2011 · discussion on HN
- 4Clang now builds Postgres without additional warnings1 people · 94 points · first shared 2011 · 19 comments on HN
- 5Sorting of integers and floats 23% faster in PostgreSQL 9.2 (long explanation)1 people · 69 points · first shared 2012 · 8 comments on HN
- 6Sorting improvements in PostgreSQL 9.2: the case for micro-optimisation1 people · 41 points · first shared 2012 · 4 comments on HN
- 7PostgreSQL corruption detection tool detects “freeze-the-dead” bug1 people · 10 points · first shared 2017 · discussion on HN
- 8What I Think of Jsonb1 people · 6 points · first shared 2014 · discussion on HN
- 9Visualizing a column's space overhead using pg_hexedit1 people · 2 points · first shared 2018 · discussion on HN
- 10Towards 14,000 write transactions per second on my laptop1 people · 2 points · first shared 2012 · discussion on HN
- 11Pg_hexedit: Rich hex editor annotations for Postgres relfiles1 people · 2 points · first shared 2017 · discussion on HN
- 12pg_hexedit now supports GiST, GIN, and hash indexes1 people · 2 points · first shared 2017 · discussion on HN
- 13Pghexedit rich hex editor annotations1 people · first shared 2018
- 14What i think of jsonb1 people · first shared 2014
- 15Abbreviated keys for numeric to1 people · first shared 2015
What HN people wrote when they linked it
twotwotwo · 2015-12-18
A possibly counterintuitive case where "the key...is expensive to compute" can be when accessing the key just requires following a pointer to something not in cache. It's not the same thing syntactically, but, for example, Postgres sped up collation by packing bytes into integers:
http://pgeoghegan.blogspot.com/2015/01/abbreviated-keys-exploiting-loc…
I've also seen speedups sorting strings by first sorting prefixes of them packed into uint64s (rather than sorting pointer/length references to string data), and in an application where a friend needed to sort a lot of indices into an array, it turned out to greatly speed the sort (by avoiding indirections) to copy the whole array, sort the indices and the copy of the array together, then toss out the copy.
petergeoghegan · 2015-05-26
Sorting will be a lot faster on PostgreSQL 9.5:
http://pgeoghegan.blogspot.com/2015/01/abbreviated-keys-exploiting-loc…
http://pgeoghegan.blogspot.com/2015/04/abbreviated-keys-for-numeric-to…
I wonder whether and to what extent Vitesse benefits from using this technique, which is fairly well known (e.g. it appears in a 1994 paper by Gray -- Alphasort).
As I go into in the second link there, someone reported an order of magnitude increase in sort performance in one case.
For what it's worth, I doubt that this fully accounts for why Vitesse is faster. I don't know that I'd trust my data to it, but I don't think it's snake oil, even if some of the figures shown are arguably a bit misleading.
wulczer · 2011-08-07
Right now it's more useful for uncovering bugs, I don't think anyone would recommend running Postgres compiled with clang on a production system.
For more info about performance, see http://pgeoghegan.blogspot.com/2011/07/could-clang-displace-gcc-genera…
ris · 2018-01-27
For even more detail, https://github.com/petergeoghegan/pg_hexedit
With further blog posts https://pgeoghegan.blogspot.co.uk/2017/11/pghexedit-rich-hex-editor-an… and http://pgeoghegan.blogspot.co.uk/2018/01/exploring-sp-gist-and-brin-in…
icebraining · 2014-05-15
No, they're different formats: http://pgeoghegan.blogspot.pt/2014/03/what-i-think-of-jsonb.html
r4um · 2014-03-25
sendob · 2013-04-01
selenamarie · 2012-08-02
Peter is awesome and is also primarily responsible for a bunch of power consumption improvements: http://pgeoghegan.blogspot.com/2012/01/power-consumption-in-postgres-9…