Threshold-based repopulation occurs automatically when INMEMORY_MAX_POPULATE_SERVERS initialization parameter is set to a value other than 0. The database repopulates IMCUs when the number of changes recorded in the transaction journal reaches an internal staleness threshold. However, repopulation has different triggers: Populate sales_tmp_ld into the IM column store by forcing a full table scan.įor example, the following query forces a full scan: SELECT /*+ FULL(s) NO_PARALLEL(s) */ COUNT(*) FROM sales_tmp_ld s Įxchange the sales_p042616 partition with the sales_tmp_ld table.įor example, alter the sales table as follows:ĪLTER TABLE sales EXCHANGE PARTITION sales_p042616 WITH TABLE sales_tmp_ld Īfter the exchange completes, the sales_p042616 partition is populated in the IM column store, and the sales_tmp_ld is no longer populated.Īutomatic repopulation takes two forms: threshold-based repopulation and trickle repopulation.Īutomatic repopulation always checks stale journal entries and uses double buffering. The sales_tmp_ld table is now marked as INMEMORY, but it is not yet populated into the IM column store. Set the INMEMORY attribute in sales_tmp_ld using an ALTER TABLE statement. The sales_tmp_ld table is not external, which means it stores rows in the data files. The table is read-only.Ĭreate a nonpartitioned table named sales_tmp_ld using CREATE TABLE. The external table does not reside in the database, and can be in any format for which an access driver is provided. To perform the exchange, do the following:Ĭreate an external table sales_tmp_ext using the CREATE TABLE. The source IMCUs are now associated with the target partition.īefore the exchange, the target partition is populated in the IM column store.Īfter the exchange, the source table remains populated in the IM column store.ĭescription of "Figure 10-3 Partition Exchange" For example, the partition is empty.Īfter the exchange, the source table is no longer populated in the IM column store. The following scenarios are possible, depending on the whether the target partition is populated:īefore the exchange, the target partition is not populated in the IM column store. To perform an exchange load, follow these steps:Ĭreate a nonpartitoned table, called a source table.Įxchange an existing table partition, called the target partition, with the table.įor the target partition to be populated in the IM column store after the exchange, the source table must be populated in the IM column store before the exchange. An exchange load is almost instantaneous because it modifies metadata instead of data. A partition exchange load is a technique that exchanges a table for a partition.
0 Comments
Leave a Reply. |