开发者

Are statistics computed for indexes associated to primary keys in Oracle 9?

开发者 https://www.devze.com 2023-03-31 07:21 出处:网络
I\'m beginning to work with Oracle and I\'ve learn that in Oracle 9 statistics aren\'t collected for an index unless you use COMPUTE STATISTICS, but you can\'t use that option when defining a primary

I'm beginning to work with Oracle and I've learn that in Oracle 9 statistics aren't collected for an index unless you use COMPUTE STATISTICS, but you can't use that option when defining a primary key, so I would want to know if primary keys can use statistics in some way.

If开发者_JAVA百科 not, is there a noticeable difference in performance? Are there any workarounds?

Thanks in advance.


First of all, you can define your index before you define the primary key constraint, hence you'll have full control over the index (you can add COMPUTE STATISTICS as well) see this http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/indexes003.htm#i1006566

Second, unless you have a good reason for it, you should use the Automatic Statistics Gathering http://download.oracle.com/docs/cd/B12037_01/server.101/b10752/stats.htm#40674

0

精彩评论

暂无评论...
验证码 换一张
取 消