Pete Scott’s random notes

One for the Oracle WTF guys perhaps

Posted by: Peter Scott on: July 13, 2006

If you have been reading my current series on data warehouse design you will have read (or perhaps soon will, as there is also a new piece in preparation!) that a good technique in the batch process is to disable bitmap indexes during an insert and then rebuild them after the insert is complete.

Inspecting the work of another company for a customer I came across a nice Oracle package to handle the niceties of index manipulation in a DW. Two procedures in the package body caught my eye: Disable_indexes and enable_indexes. Well that sounds good…

… except for the code!

  • disable_indexes invokes a cursor loop to go through all the indexes in USER_INDEXES and does an execute immediate DROP index for each index
  • enable_indexes writes a message to a log file saying ‘This code is not implemented’

Nice!

6 Responses to "One for the Oracle WTF guys perhaps"

WTF!

That is wonderful.

NFW- similar to WTF…

that hurts so very very deeply…

please tell me this is still in development. please.

A production system, Niall but as it has indexes I don’t think it has been run!

That is so cool Pete, maybe you could suggest that they go for gold and loop through USER_TABLES or maybe even DBA_TABLES as well. that would be a powerul utility to have..:-)

The ‘code not implemented’ error in the enable_indexes procedure is only there until the developers figure out how to undrop an index.

Maybe when they’ve done that they can think about how they handle partitioned indexes.

Leave a Reply