用于计算索引使用的字节的公式:(列大小之和 + 9) * 行 * 1.25
例如:
create table person ( person_id serial, fname char(25), lname char(25), ssn char(char9) );
create index ix1 on person(person_id);
create index ix2 on person(ssn);
create index ix3 on (fname, lname);
估算结果如下:
ix1: (4 +9) * 1000000 * 1.25 ----> 16,250,000 bytes or 16,250 Kb
ix2: (9+9) * 1000000 * 1.25 -----> 22,500,000 bytes or 22,500 Kb
ix3: (25+25+9) * 1000000 * 1.25 ---> 73,750,000 bytes or 73,750 Kb