sql - ORACLE 11g SET COLUMN NULL for specific Partition of large table -


i have composite-list-list partitioned table 19 columns , 400 million rows. once week new data inserted in table , before insert need set values of 2 columns null specific partitions.

obvious approach following column_1 partition criteria:

update blabla_table  set column_18 = null, set column_19 = null  column_1 in (value1, value2…) 

of course awfully slow.

my second thought use ctas every partition need set 2 columns null , use exchange partition update data in big table. unfortunately wouldn’t work because it´s composite-partition.

i use same approach subpartitions have use cats 8000 times , drop tables afterwards every week. guess not pass upcoming code-review.

may has idea how performantly solve this?

ps: i’m using oracle 11g database. pps: sorry bad english…..

you've ruled out updating through ddl (switch partitions), lets dml consider.

i don't think it's bad update table heavily partitioned. can split update in 8k mini updates (each single tiny partition):

update blabla_table subpartition (partition1) set column_18 = null... 

each subpartition contain 15k rows updated on average update relatively tiny.

while still represents big amount of work, should easy set run in parallel, during hours database activity light. individual updates easy restart if 1 of them fails (rows locked?) whereas 120m update take such long time rollback in case of error.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -