Search Posts

Author: BigDong

How to store efficiently hierarchical data in PostgreSQL (LFT/RGT vs PARENT_ID)

We have a Java application and we want to create an abstract HierarchicalId class to use as an extend of any entity that is part of a tree. Our experience in MySQL showed us that it is much more efficient for READ operation to store the left and right position. See http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/ for more details We will read 95% of the time, but the 5% remaining will still require CREATE/UPDATE/DELETE, we also need to be […]