In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Scene:
Delete a large table of 300 million.
It is realized through the intermediate table.
First write the data that needs to be archived into the history table Cou_History..Cou_History.
Write the field conditions that need to delete the table to the intermediate table.
Select SysNo into COU_temp01
FROM COU
WHERE EXISTS (SELECT 1 FROM Cou_History..Cou_History a WHERE a.SysNo=COU.SysNo)
Then use the intermediate table as the intermediate condition to delete the relevant data of the main table. Then delete the intermediate table field data that has been deleted in the main table.
The following SQL loop is executed until all have been deleted.
DELETE TOP (1000)
From COU
Where SysNo in
(select top 1000 * from COU_temp01)
Delete top (1000) from COU_temp01
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.