RE: No future for DB2 - slightly off-topic,
Posted in 2005
Topics: General Discussion
>>It follows with my personal belief that the need of every index should be periodically re-evaluated, and - if it's existance can not (or can no longer) be justified, the index should be eliminated. >>Thankfully, Oracle provides the ability to monitor index usage. It does that in 10g, does it do it in 9i? We are just getting into 10g. does this functionality come free of charge on either version? Funny with oracle, one must always remember to ask if cool features cost extra. Thanks, NJ ============================================================ The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any reproduction, dissemination or distribution of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Tellabs ============================================================ sending to informix-list
Sebastian, Norma J. wrote:
>>>It follows with my personal belief that the need of every index should
>
> be periodically re-evaluated, and - if it's existance can not (or can no
> longer) be justified, the index should be eliminated.
>
>>>Thankfully, Oracle provides the ability to monitor index usage.
>
>
>
> It does that in 10g, does it do it in 9i?
> We are just getting into 10g. does this functionality come free of
> charge on either version?
In both 9i and 10g and free.
> Funny with oracle, one must always remember to ask if cool features cost
> extra.
> Thanks,
> NJ
Here's a simple demo:
-- begin index monitoring
ALTER INDEX ix_index_demo_gender_state MONITORING USAGE;-- could have been done during initial creation too
-- gather optimizer statistics on the new index
exec dbms_stats.gather_index_stats(OWNNAME=>'UWCLASS',
INDNAME=>'IX_INDEX_DEMO_GENDER_STATE');
-- run a SELECT statement that will use the index
SELECT COUNT(*)
FROM index_demo
WHERE gender = 'M';
-- look at the usage statistics
SELECT *
FROM v$object_usage;
-- set the index back to non-monitoring
ALTER INDEX ix_index_demo_gender_state NOMONITORING USAGE;--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)