Performant database tree traversal with Rails

New post over on the PlanetScale blog. This was the toughest N+1 performance problem I've faced.

It shows a trick you can use to preload records, in a situation where includes doesn't cut it.

Go check it out.