为MOT创建索引

支持标准的PostgreSQL创建和删除索引语句。

例如:

  1. create index text_index1 on test(x) ;

创建一个用于TPC-C的ORDER表,并创建索引:

  1. create FOREIGN table bmsql_oorder (
  2. o_w_id integer not null,
  3. o_d_id integer not null,
  4. o_id integer not null,
  5. o_c_id integer not null,
  6. o_carrier_id integer,
  7. o_ol_cnt integer,
  8. o_all_local integer,
  9. o_entry_d timestamp,
  10. primarykey (o_w_id, o_d_id, o_id)
  11. );
  12. create index bmsql_oorder_index1 on bmsql_oorder(o_w_id, o_d_id, o_c_id, o_id) ;

为MOT创建索引 - 图1 说明: 在MOT名字之前不需要指定FOREIGN关键字,因为它仅用于创建和删除表的命令。

有关MOT索引限制,请参见“MOT SQL覆盖和限制”的索引部分内容。