Oracle DB daily partitioning

后端 未结 3 949
你的背包
你的背包 2021-02-09 14:43

I have the following table

  CREATE TABLE \"METRIC_VALUE_RAW\" 
   (    
    \"SUBELEMENT_ID\" INTEGER NOT NULL , 
    \"METRIC_METADATA_ID\" INTEGER NOT NULL ,          


        
3条回答
  •  不要未来只要你来
    2021-02-09 15:28

    As i said , There are big differences in partition automation between 10g and 11g. In 10G you will have to manually manage the partitions during your ETL process (I'm sure every 10g DBA has a utility package he wrote to manage partitions ... ).

    For steps 1 & 2 , you have several options

    1. load data directly into the daily partition.
    2. load data into a new partition and merge it into the daily one.
    3. load data into a new partition every hour, and during a maintenance window merge all hourly partitions into a daily partition.

    The right way for you depends on your needs. Is the newly added data is queried immediately ? In what manner ? Would you query for data across several hours (or loads...) ? Are you showing aggregations ? are you performing DML operations on the data (DDL operations on partitions cause massive locking).

    about 3, again - manually. drop old partitions.

    In 11G, you have the new interval partition feature with automates some of the tasks mentioned above.

提交回复
热议问题