Verify Rebuild index [message #548776] |
Mon, 26 March 2012 04:13 |
|
Jack14
Messages: 497 Registered: December 2011 Location: INDIA
|
Senior Member |
|
|
Hi,
How to verify if rebuild an index is required in database.
Regards,
Jack
|
|
|
|
|
|
|
|
Re: Verify Rebuild index [message #548798 is a reply to message #548793] |
Mon, 26 March 2012 05:55 |
|
Jack14
Messages: 497 Registered: December 2011 Location: INDIA
|
Senior Member |
|
|
Ram/Michel,
Let me explain you the findings.
Step1.
There were 200 tables in a schema.I verified the dml operations using below query.
select table_name,delete,timestamp from user_tab_modifications
Out of 200 tables , only few tables say (50 tables) have approximate number of deletes like below.
tbl name delete
--------- -------
Tab1 -- 336046
tab2 -- 9821468
tab3 -- 25800068
tab4 -- 140268
Step2
I analyzed the indexes (for only those 50 tables) using below command.
analyze index JACK.SCUST_IDX1 validate structure;
After analyzing the index ,i ran the below query to see the percentage of table data changes.
select del_lf_rows * 100 / decode(lf_rows,0,1,lf_rows) from index_stats where name ='SCUST_IDX1'
But the above statement returns 0 rows.
Does it mean we dont need to rebuild the index based on the above output.Can you clarify ?
Regards,
[Updated on: Mon, 26 March 2012 05:58] Report message to a moderator
|
|
|
|
Re: Verify Rebuild index [message #548822 is a reply to message #548799] |
Mon, 26 March 2012 08:42 |
|
Jack14
Messages: 497 Registered: December 2011 Location: INDIA
|
Senior Member |
|
|
Michel,
Thanks for your advice. I will follow the same.
Quote:You NEVER have to rebuild indexes unless something requires it, that is bulk delete
I agree with you.My question is how to verify the table has bulk delete ?
Regards,
[Updated on: Mon, 26 March 2012 08:43] Report message to a moderator
|
|
|
Re: Verify Rebuild index [message #548824 is a reply to message #548822] |
Mon, 26 March 2012 08:52 |
|
Michel Cadot
Messages: 68729 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
As I said, a bulk delete is not (should not be) done during normal hours and so application will ask for a maintenance time for this and so you will know.
In short, the user will tell you.
And, in addition, this does not matter as index rebuilds should be done in the same process.
Regards
Michel
[Updated on: Mon, 26 March 2012 08:53] Report message to a moderator
|
|
|