{"id":221,"date":"2020-10-01T04:00:33","date_gmt":"2020-09-30T20:00:33","guid":{"rendered":"https:\/\/www.mengqingzhong.com\/?p=221"},"modified":"2024-01-14T11:38:31","modified_gmt":"2024-01-14T03:38:31","slug":"postgresql-index-btree-4","status":"publish","type":"post","link":"https:\/\/www.mengqingzhong.com\/2020\/10\/01\/postgresql-index-btree-4\/","title":{"rendered":"PostgreSQL\u7d22\u5f15(4) \u2013 B-tree"},"content":{"rendered":"

\n\u672c\u6587\u7ffb\u8bd1\u81eaEgor Rogov\u7684\u82f1\u6587\u535a\u5ba2<\/a>\uff0c\u4e14\u5df2\u5f81\u5f97Egor Rogov\u7684\u540c\u610f\u3002\u8bd1\u8005\u505a\u4e86\u5c11\u91cf\u4fee\u6539\u3002\n<\/p>\n

\n\u5ba1\u6821\uff1a\u7eaa\u6600\u7ea2\uff0c\u4e2d\u56fd\u4eba\u6c11\u5927\u5b66\u4fe1\u606f\u5b66\u9662\u5728\u8bfb\u535a\u58eb\u751f\u3002\n<\/p>\n

\u6211\u4eec\u5df2\u7ecf\u4ecb\u7ecd\u4e86PG\u7684\u901a\u7528\u7d22\u5f15\u5f15\u64ce\u3001\u63a5\u53e3\u3001Hash\u7d22\u5f15\u3002\u672c\u6587\u5c06\u4ecb\u7ecdB-tree\uff0c\u5b83\u662f\u6700\u4f20\u7edf\u3001\u4f7f\u7528\u6700\u5e7f\u6cdb\u7684\u7d22\u5f15\u7c7b\u578b\u3002<\/p>\n

1. \u7ed3\u6784<\/h1>\n

\u5728PG\u4e2d\uff0cB-tree\u7d22\u5f15\u88ab\u5b9e\u73b0\u4e3aB-tree AM\uff0c\u5b83\u9002\u5408\u53ef\u4ee5\u88ab\u6392\u5e8f\u7684\u6570\u636e\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u5fc5\u987b\u7ed9\u76f8\u5e94\u7684\u6570\u636e\u7c7b\u578b\u5b9a\u4e49\u4e0b\u97625\u4e2a\u64cd\u4f5c\u7b26\uff1a\u5927\u4e8e\u3001\u5927\u4e8e\u7b49\u4e8e\u3001\u7b49\u4e8e\u3001\u5c0f\u4e8e\u7b49\u4e8e\u3001\u5c0f\u4e8e\u3002<\/p>\n

B-tree\u7d22\u5f15\u7684\u884c\u6570\u636e\u88ab\u7ec4\u7ec7\u6210\u9875\u9762\u3002\u53f6\u5b50\u9875\u9762\u4e2d\u7684\u884c\u6570\u636e\uff0c\u5b58\u653e\u7684\u662f<key, TID>\u952e\u503c\u5bf9\u3002\u975e\u53f6\u5b50\u9875\u9762\u4e2d\u5b58\u653e\u7684\u662f<minvalue, childptr>\u952e\u503c\u5bf9\uff0cchildptr\u6307\u5411\u672c\u9875\u9762\u7684\u5b69\u5b50\u9875\u9762\uff08\u53ef\u4ee5\u662f\u53f6\u5b50\u9875\u9762\uff0c\u4e5f\u53ef\u662f\u5176\u5b83\u975e\u53f6\u5b50\u9875\u9762\uff09\uff0cminvalue\u662f\u5b50\u9875\u9762\u4e2d\u7684\u6700\u5c0f\u503c\u3002<\/p>\n

\u4e0b\u6587\u4e5f\u5c06\u9875\u9762\u79f0\u4e3a\u8282\u70b9\u3002<\/p>\n

B-tree\u5177\u6709\u51e0\u4e2a\u91cd\u8981\u7684\u7279\u70b9\uff1a<\/p>\n