相关疑难解决方法(0)

Postgres Materialized Path - What are the benefits of using ltree?

Materialized Path is a method for representing hierarchy in SQL. Each node contains the path itself and all its ancestors (grandparent/parent/self).

The django-treebeard implementation of MP (docs):

  1. Each step of the path is a fixed length for consistent performance.

  2. Each node contains depth and numchild fields (fast reads at minimal cost to writes).

  3. The path field is indexed (with a standard b-tree index):

    The materialized path approach makes heavy use of LIKE in your database, with …

postgresql hierarchy ltree

5
推荐指数
1
解决办法
1700
查看次数

标签 统计

hierarchy ×1

ltree ×1

postgresql ×1