A table in our schema is already having 100 columns.We need to add some 600 more columns if we follow horizontal data storage method. If we go for vertical data storage which means creating new table and creating referential integrity with table having 100 columns, there will be issue with joining the table as the table having 100 columns is having 53 million records and new table created will be having much more than that. Which is better approach in this case.
I would like to add an interesting test case here . I added 600 column to my table already having 87 column and 53 million records. I then tried to update it in batches
a>Time taken to update 1000 records >> 2.10 secs b>Time taken to update 10000 records >> 5.57 secs c>Time taken to update 1000000 records >> 5.42 mins d>Time taken to update 53 million records >> 4. 5 hrs (the table space exhausted and we needed to extend the table space)
Can anyone suggest a faster method of update?