Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于 CockroachDB 将我的表存储在其主键中,我如何反转主键列的顺序,以优化以降序排列的方式读取它?
DESC您可以通过包含列来控制主键的排序顺序,例如CREATE TABLE tbl (a INT, b INT, PRIMARY KEY (a DESC, b);
DESC
CREATE TABLE tbl (a INT, b INT, PRIMARY KEY (a DESC, b);