导读:1建站知识这篇文章主要介绍了临时处理去重 80w 数据时夯死现象,需要的朋友可以参考下 近日,在对一张百万数据的业务表进行去重时,去重操作竟然夯住了。下面就来简单回忆一下seo网站关键词优化百度seo网站优化。

这篇文章主要介绍了临时处理去重 80w 数据时夯死现象,需要的朋友可以参考下
近日,在对一张百万数据的业务表进行去重时,去重操作竟然夯住了。下面就来简单回忆一下。
1、查询业务表数据量,查看到总共有200多w条
SQL> select count(*) from tb_bj_banker_etl;
2552381
2、查询表内应该去掉的重复数据量,共80多w条
SQL> select count(*) from tb_bj_banker_etl where (id) in (select id from tb_bj_banker_etl group by id having count(*)>1) and rowid not in(select max(rowid) from tb_bj_banker_etl group by&nb高端网站建设sp;id having count(*)>1);
830099
3、于是,在晚上下班前,执行了下面的语句脚本,为了去重
SQL> delete from tb_bj_banker_etl where(id) in (select id from tb_bj_banker_etl group by id having count(*)>1) and rowid not in(select max(rowid) from tb_bj_banker_etl group by id having count(*)>1);
关键词标签: 实例 现象
声明: 本文由我的SEOUC技术文章主页发布于:2023-05-22 ,文章实例讲解临时处理去重 80w 数据时夯死现象建站知主要讲述实例,现象,实例讲解临时处理去重 80w 数据时夯死网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_4064.html