High performance loading
Next, we show a very useful trick to add large volumes of new data to an existing partitioned table already indexed. We want to add this data in such a way as to avoid disruption to queries against the table, and at the same time, reduce the cost of index maintenance on the partitioned table. There are two cases we can consider. In the first case, the new data that is coming in does not have to be available for queries as soon as the data is acquired. This can be supported with a staging table to collect the incoming data. In the second case, the incoming data should be available for queries as soon as the data is acquired. In this case, we cannot use a staging table and the data has to be directly inserted into the base table.
Loading with a staging table
In this case, the data is coming in at a very fast rate or is being moved from an OLTP database to a data warehouse. In both cases, we can use a staging table to collect the incoming data so that the index on the...