在创建PK之前创建一个具有所需属性的唯一索引 (使用alter table创建PK)。 I怀疑minpctused使用会有所帮助。实际上它可能会变得更糟,因为 它会尝试在你插入时重新编辑索引页面并且 删除。 我建议为索引使用高百分比免费值(25-30%)。 其他选项包括使用加载命令。 感谢您的提示和建议。 我会尝试高百分比的免费价值,但负载是不可能的。 应用程序(不是我们的)只是按照这种方式工作。 我希望其中一个选项可以工作,因为我必须说DB2不是 为我们正在做的高交易量构建,这将非常悲伤。 我读到了类型2索引的好处,但似乎有一个 大的缺点是因为它降低了索引的效率大时间在我们的情况下。 DB2在具有高交易量的基准测试中表现非常出色,因此为这些工作负载构建了 。实际上,DB2在TPC-C基准测试中保持了最高tpmC 的记录。 http://www.tpc.org/tpcc/results/tpcc_perf_results.asp We are using DB2 UDB version 8.1 fp7 & fp9 on AIX 5.2.On our databases we do massive inserts and deletes (millions of rows).The performance is dramatically reduced because of pseudo deleted keys.In a 10 minutes it goes from 18000 transaction per minute to 9000 andlower.When an index reorg with CLEANUP ONLY PAGES is executed, the number oftransactions climbs again. But a few minutes later it drops again to9000.We have to run the reorg constantly to keep a steady speed.I''m thinking of using the option minpctused on all indexes.But how do you specify this when constraints like primary keys areused?Are there other options we can use to keep a steady performance. 解决方案Create an unique index with the attributes you want prior to creating the PK(create the PK with an alter table).I doubt that minpctused used will help. In fact it may make it worse sinceit will attempt to reorg the index pages online while your are inserting anddeleting.I would suggest using a high percent free value (25-30%) for the indexes.Other options include using the load command.DB2 has done very well in benchmarks with high transaction volumes, so it isbuilt for such workloads. In fact, DB2 holds the record for the highest tpmCin the TPC-C benchmark. http://www.tpc.org/tpcc/results/tpcc_perf_results.asp 这篇关于类型2索引导致性能下降的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-02 02:25