copy_part_stat.sql
spool 04_copy_part_stat.log
conn / as sysdba
execute sys.dbms_stats.export_schema_stats(ownname=>'test',statown=>'OPER',stattab=>'STAT_TABLE',statid=>'test_20160831');
execute sys.dbms_stats.export_schema_stats(ownname=>'test',statown=>'OPER',stattab=>'STAT_TABLE',statid=>'test_20160831');
--execute sys.dbms_stats.export_schema_stats(ownname=>'test',statown=>'OPER',stattab=>'STAT_TABLE',statid=>'test_20160831');
execute sys.dbms_stats.export_schema_stats(ownname=>'test',statown=>'OPER',stattab=>'STAT_TABLE',statid=>'test_20160831');
disconnect;
@/testdb/change/env/env_test.sql
conn &v_test_un/&v_test_pw
set time on set timing on set echo on set linesize 150 set pagesize 400
EXEC DBMS_STATS.COPY_TABLE_STATS('test','test','PART148','PART145');
select table_name,PARTITION_NAME,num_rows,AVG_ROW_LEN,BLOCKS from user_tab_partitions where table_name in ('test') order by table_name, partition_name;
select index_name , partition_name from user_ind_partitions where status !='USABLE';
select index_name from user_indexes where status='UNUSABLE';
select distinct status from user_indexes; select distinct status from user_ind_partitions;
REF:
COPY_TABLE_STATS (new 11g parameters) | |
Copy statistics from one table partition to another | dbms_stats.copy_table_stats( ownname IN VARCHAR2, tabname IN VARCHAR2, srcpartname IN VARCHAR2, dstpartname IN VARCHAR2, scale_factor IN NUMBER DEFAULT 1, flags IN NUMBER DEFAULT NULL, force IN BOOLEAN DEFAULT FALSE); |
SELECT partition_name FROM user_tab_partitions WHERE table_name = 'SALES'; exec dbms_stats.copy_table_stats('SH', 'SALES', 'SALES_Q3_2002', 'SALES_Q3_2003'); |
copy_part_stat.sql的更多相关文章
- 最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目
最近帮客户实施的基于SQL Server AlwaysOn跨机房切换项目 最近一个来自重庆的客户找到走起君,客户的业务是做移动互联网支付,是微信支付收单渠道合作伙伴,数据库里存储的是支付流水和交易流水 ...
- SQL Server 大数据搬迁之文件组备份还原实战
一.本文所涉及的内容(Contents) 本文所涉及的内容(Contents) 背景(Contexts) 解决方案(Solution) 搬迁步骤(Procedure) 搬迁脚本(SQL Codes) ...
- Sql Server系列:分区表操作
1. 分区表简介 分区表在逻辑上是一个表,而物理上是多个表.从用户角度来看,分区表和普通表是一样的.使用分区表的主要目的是为改善大型表以及具有多个访问模式的表的可伸缩性和可管理性. 分区表是把数据按设 ...
- SQL Server中的高可用性(2)----文件与文件组
在谈到SQL Server的高可用性之前,我们首先要谈一谈单实例的高可用性.在单实例的高可用性中,不可忽略的就是文件和文件组的高可用性.SQL Server允许在某些文件损坏或离线的情况下,允 ...
- EntityFramework Core Raw SQL
前言 本节我们来讲讲EF Core中的原始查询,目前在项目中对于简单的查询直接通过EF就可以解决,但是涉及到多表查询时为了一步到位就采用了原始查询的方式进行.下面我们一起来看看. EntityFram ...
- 从0开始搭建SQL Server AlwaysOn 第一篇(配置域控)
从0开始搭建SQL Server AlwaysOn 第一篇(配置域控) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www.cnb ...
- 从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群)
从0开始搭建SQL Server AlwaysOn 第二篇(配置故障转移集群) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...
- 从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn)
从0开始搭建SQL Server AlwaysOn 第三篇(配置AlwaysOn) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://w ...
- 从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点)
从0开始搭建SQL Server AlwaysOn 第四篇(配置异地机房节点) 第一篇http://www.cnblogs.com/lyhabc/p/4678330.html第二篇http://www ...
随机推荐
- SPOJ 705 New Distinct Substrings
后缀数组.按照排序完的后缀一个一个统计.每一个后缀对答案做出的贡献为:n-SA[i]-height[i]. #pragma comment(linker, "/STACK:102400000 ...
- Oracle小技术集锦
- 缩放系列(三):一个可以手势缩放、拖拽、旋转的layout
弄了一个下午,终于搞出来了,PowerfulLayout 下面是一个功能强大的改造的例子: 可以实现以下需求: 1.两个手指进行缩放布局 2.所有子控件也随着缩放, 3.子控件该有的功能不能丢失(像b ...
- WEBROOT根目录 <%=request.getContextPath()%>
WEBROOT根目录 <%=request.getContextPath()%> == ${pageContext.request.contextPath}
- springmvc上传图片,发送邮件
package hcxAction; import hcxMode.Advertises; import hcxMode.Areas; import hcxMode.Saveresume; impor ...
- cpu、内存、缓存、硬盘使用率
1.cpu ./bunsan2.sh uptime < servers.txt | awk '{print $11 }' |sed 's/,//g' #!/bin/bash cpu_load=$ ...
- centos mono
wget http://download.mono-project.com/sources/mono/mono-4.0.1.tar.bz2wget http://download.mono-proje ...
- oomph
http://blog.csdn.net/u011004037/article/details/45679573 这么好个功能起了这么操蛋个名字害得老子一直不知道他干啥的
- 【转】哦,mysql 的其它发行版本Percona, mariadb
原文:http://geek.csdn.net/news/detail/130146 2016年11月25日,沃趣科技"智慧应用 数据先行"2016产品发布会暨新三板挂牌庆祝会在杭 ...
- Array.length vs Array.prototype.length
I found that both the Array Object and Array.prototype have the length property. I am confused on us ...