News for hackers. Stuff that matters.
Re:PostgreSQL 9.6 Released by ngrilly on Thursday September 29, 2016 @12:51PM (#12606792)
> The strategy I suggested gets you the desired outcome of not including a large PK in all secondary indexes.

For an application in which most queries need a secondary index lookup, using heap organized tables is more efficient because the database needs to traverse only one B-tree (for the secondary index) that gives the physical position of the row in the heap. When using index organized tables, the database needs to traverse 2 B-trees (the secondary index first, then the primary index). Making the primary key short by using an auto incrementing integer helps, but doesn't remove this overhead.

There are no comments on this comment yet.