This database stored procedure deals with all the DB maintenance before loading the fact table. So for an initial load, it disables all objects that might slow down the load, for delta load it optionally disables indexes based on the $G_REBUILD_INDEXES global variable.