简体   繁体   English

oracle中的庞大数据库

[英]Huge Data Base in oracle

I had about 20,000,000 records in a table (random data), and then I added empty column to that table... but when I update that table to fill that column, the process was broken down.. I tried to use the cursor and the index but no results.. do you have any fast solution or any alternative solution?我在一个表(随机数据)中有大约 20,000,000 条记录,然后我向该表添加了空列......但是当我更新该表以填充该列时,该过程被破坏了......我尝试使用游标和索引但没有结果..您有任何快速解决方案或任何替代解决方案吗?

Thank you in advance :)先感谢您 :)

Maybe the fastest way would be to create new_table as select * from existing table, and then inside the select statment of CTAS, calculate the value of the new column.也许最快的方法是创建 new_table 作为 select * from existing table,然后在 CTAS 的 select 语句中,计算新列的值。 After that, you can rename old table to something like table_bckp, then rename new table to the original table name, and then apply constraints, indexes, and other scripts previously saved from old table definitions.之后,您可以将旧表重命名为 table_bckp 之类的名称,然后将新表重命名为原始表名,然后应用先前从旧表定义中保存的约束、索引和其他脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM