Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Re: HowTo find ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 14 Topic 6839 of 7280
Post > Topic >>

Re: HowTo find out used (useful) and unused (usesless) indexes?

by DA Morgan <damorgan@[EMAIL PROTECTED] > Apr 20, 2008 at 01:33 PM

Shakespeare wrote:
> "DA Morgan" <damorgan@[EMAIL PROTECTED]
> schreef in bericht 
> news:1208624947.696580@[EMAIL PROTECTED]
>> Shakespeare wrote:
>>
>>> But an index may become useful over time, true?
>>>
>>> Shakespeare
>> On that basis alone one could justify putting an index on every
>> column of every table so I will respectfully disagree unless you
>> write a very broad definition of "may."
>>
>> You need to understand your data and how it is being accessed.
>> The extra overhead of an unused index is not value added.
>>
>> My recommendation would be to use the DBMS_STATS.SET.... procedures
>> to see how queries will react to the expected future growth of both
>> tables and indexes.
>> -- 
>> Daniel A. Morgan
>> Oracle Ace Director & Instructor
>> University of Wa****ngton
>> damorgan@[EMAIL PROTECTED]
 (replace x with u to respond)
>> Puget Sound Oracle Users Group
>> www.psoug.org
> 
> I was aiming at data with for example a 'year' column. This column could
be 
> indexed by design, but in the first year (all records same value) this
index 
> is not useful and won't be used. But on the first entry in the second
year 
> it is useful to find entries of that year and so on. A script to remove
or 
> disable unused indexes would remove/disable this index in the first
year.
> 
> Shakespeare 

Interesting example.

First year the index is worthless. Second year it is valuable for some
short amount of time and then, again, may become useless as the
percentage of records in each of the two years approaches 50%. Go for
the third year ... again possibly usable for some period of time and
then all three years probably tend toward 33.3%. By the end of year
four you are going for 25%.

I would not be all that ready to build that index unless I know, again
using DBMS_STATS.SET_TABLE_STATS and SET_INDEX_STATS how Oracle was
going to use it. That is not to say the index might not make a lot of
sense ... I just would insist on testing any assumption before
deciding to either build it or not.
-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Wa****ngton
damorgan@[EMAIL PROTECTED]
 (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
 




 14 Posts in Topic:
HowTo find out used (useful) and unused (usesless) indexes?
Andreas Mosmann <mosma  2008-04-17 11:38:22 
Re: HowTo find out used (useful) and unused (usesless) indexes?
"fitzjarrell@[EMAIL   2008-04-17 05:45:26 
Re: HowTo find out used (useful) and unused (usesless) indexes?
DA Morgan <damorgan@[E  2008-04-17 10:02:24 
Re: HowTo find out used (useful) and unused (usesless) indexes?
Andreas Mosmann <mosma  2008-04-18 11:29:40 
Re: HowTo find out used (useful) and unused (usesless) indexes?
joel garry <joel-garry  2008-04-18 14:45:00 
Re: HowTo find out used (useful) and unused (usesless) indexes?
yf110@[EMAIL PROTECTED]   2008-04-18 15:01:06 
Re: HowTo find out used (useful) and unused (usesless) indexes?
"Shakespeare" &  2008-04-19 11:37:36 
Re: HowTo find out used (useful) and unused (usesless) indexes?
DA Morgan <damorgan@[E  2008-04-19 10:09:08 
Re: HowTo find out used (useful) and unused (usesless) indexes?
"Shakespeare" &  2008-04-20 10:05:17 
Re: HowTo find out used (useful) and unused (usesless) indexes?
DA Morgan <damorgan@[E  2008-04-20 13:33:34 
Re: HowTo find out used (useful) and unused (usesless) indexes?
DA Morgan <damorgan@[E  2008-04-19 10:06:22 
Re: HowTo find out used (useful) and unused (usesless) indexes?
Andreas Mosmann <mosma  2008-04-21 18:37:17 
Re: HowTo find out used (useful) and unused (usesless) indexes?
Robert Klemme <shortcu  2008-04-21 01:24:52 
Re: HowTo find out used (useful) and unused (usesless) indexes?
joel garry <joel-garry  2008-04-21 11:46:53 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 0:29:00 CST 2008.