Oracle DB daily partitioning -
i have following table
create table "metric_value_raw" ( "subelement_id" integer not null , "metric_metadata_id" integer not null , "metric_value_int" integer, "metric_value_float" float(126), "time_stamp" timestamp not null ) ;
- every hour data loaded table using sql loader.
- i want create partitions data every day go partition.
- in table want store data 30 days. when crosses 30 days, oldest partition should deleted.
can share ideas on how can design partitions.
as said , there big differences in partition automation between 10g , 11g. in 10g have manually manage partitions during etl process (i'm sure every 10g dba has utility package wrote manage partitions ... ).
for steps 1 & 2 , have several options
- load data directly daily partition.
- load data new partition , merge daily one.
- load data new partition every hour, , during maintenance window merge hourly partitions daily partition.
the right way depends on needs. newly added data queried ? in manner ? query data across several hours (or loads...) ? showing aggregations ? performing dml operations on data (ddl operations on partitions cause massive locking).
about 3, again - manually. drop old partitions.
in 11g, have new interval partition feature automates of tasks mentioned above.
Comments
Post a Comment