天天看點

GBase8s資料庫索引優化方法

方法:

select t.tabname,i.idxname, i.levels

from sysindexes i,systables t

where i.tabid = t.tabid

and i.levels>=4

order by 3 desc

運作情況:

tabname idxname levels

orders_sum 117_29 5

orders 112_16 4

cust_calls 111_19 4

customer 110_13 4

cust_calls 111_20 4

cust_calls 111_15 4

健康狀況評估:

如果哪個表的索引超過了 4 層,您可能就需要考慮删除和重新建構該索引,進而合并其層,以擷取更好的性能。