db2 database create index, delete index, view table index

1. Create a table index

    create index index name on table name (column name, column name);

2, delete the table index

    drop index index name on table name;

3. View table index

    select * from sysibm.sysindexes where tbname='table name'; --- table name is case sensitive

    Or in the background you can use:

    describe indexes for table 表名;

4. View the SQL statement execution plan

    db2expln -d 库名 -f test.sql -t -g -z ";" > test.exp

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325238763&siteId=291194637