One for the Oracle WTF guys perhaps

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!