ITQuants blog

Oracle: how to force the generation of indexes?

Nov 9

Written by:
11/9/2012 5:55 PM  RssIcon

In most cases, the error made by the developer when changing a lot of data on a table is to forget the (re)generation of the index. Such an error will degrade the performance of all queries made during the day with indexes generated automatically during the night.

In order to avoid such a problem, the following PL/SQL code should be used:

exec dbms_stats.gather_table_stats('my_user','my_table_name, cascade =>TRUE);

By selecting cascade to TRUE, it indicates that all indexes linked to the table named 'my_table_name' will be updated.

Tags:
Categories: Oracle

Search blog