By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
4 rows affected
id | code | name | parent |
---|---|---|---|
1 | M0 | 系統 | null |
2 | M00 | 權限 | 1 |
3 | M00-00 | 角色權限 | 2 |
4 | M00-01 | 角色審核 | 2 |
id | path |
---|---|
1 | [M0,系統] |
2 | [M0,系統] -> [M00,權限] |
3 | [M0,系統] -> [M00,權限] -> [M00-00,角色權限] |
4 | [M0,系統] -> [M00,權限] -> [M00-01,角色審核] |