首页 > 其他分享 >_cursor_obsolete_threshold 模拟

_cursor_obsolete_threshold 模拟

时间:2024-08-12 09:29:37浏览次数:6  
标签:create obsolete cursor a0001 threshold table select

创建对象
drop table a0001;
create table a0001  as select * from dba_objects;
create table a0002  as select * from dba_objects where 1=2;
create index iOBJECT_ID on a0001(OBJECT_ID)
create index iCREATED on a0001(CREATED)

收集统计信息
begin
     dbms_stats.gather_table_stats(ownname => user,
                                   tabname => 'A0001',
                                   cascade => true,
                                   estimate_percent => 100,
                                   method_opt => 'for all columns size 1', 
                                   no_invalidate => false,
                                   degree => 1,
                                   force => true);
end;
/

语句执行和收集统计信息交替

set linesize 300
set pagesize 10000
alter session set "_cursor_obsolete_threshold"=3;
var a1 number; exec :a1:=1001; select * from a0001 where OBJECT_ID=:a1; select * from table(dbms_xplan.display_cursor('dfxjn2nq1x3pa',null,format=>'advanced')); 查询确认: select a.CHILD_NUMBER,a.SQL_TEXT,a.USERS_OPENING,a.INVALIDATIONS,a.IS_OBSOLETE from v$sql a where sql_id='dfxjn2nq1x3pa';

 

标签:create,obsolete,cursor,a0001,threshold,table,select
From: https://www.cnblogs.com/notonlydba/p/18354341

相关文章

  • Android开发 - (适配器)Adapter类中CursorAdapter实现类详细解析
    作用将Cursor对象中的数据与AdapterView组件(如ListView、GridView等)进行绑定。以下是CursorAdapter的主要作用:1.数据源绑定数据源连接:CursorAdapter通过Cursor对象作为数据源,实现了从数据库或其他数据源(如ContentResolver查询结果)中读取数据的功能。这使得开发者能够轻松地......
  • Leetcode 1334 Find the City With the Smallest Number of Neighbors at a Threshold
    Problem:FindtheCityWiththeSmallestNumberofNeighborsataThresholdDistanceTheknowledgepointsoutsideofmyskilltreeExplanationofCodeandConceptsWhatisfloat('inf')?float('inf')inPythonrepresentspositiveinfin......
  • opencascade AIS_InteractiveContext源码学习9 obsolete methods
    AIS_InteractiveContext前言交互上下文(InteractiveContext)允许您在一个或多个视图器中管理交互对象的图形行为和选择。类方法使这一操作非常透明。需要记住的是,对于已经被交互上下文识别的交互对象,必须使用上下文方法进行修改。如果交互对象尚未加载到交互上下文中,您才......
  • 流式查询1. mybatis的游标Cursor,分页大数据查询
    流式查询流式查询指的是查询成功后不是返回一个集合而是返回一个迭代器,应用可以通过迭代器每次取一条查询结果。流式查询的好处是能够降低内存使用。例如我们想要从数据库取1000万条记录而又没有足够的内存时,就不得不分页查询。而分页查询就需要我们按照顺序查询并设置一个参......
  • 【CSS: cursor】鼠标光标指针样式大全
    浏览器内置指针样式:标了红色*号的为我认为的常用指针样式。cursor:auto;(默认值)浏览器根据当前内容自动决定指针样式;例如当内容是文字时使用text样式cursor:default;默认指针,通常是箭头。cursor:none;不渲染指针!cursor:context-menu;(该指针经测试没效果?)指针下有可用内......
  • 在ubuntu22.04下安装cursor
    在ubuntu22.04下安装cursor安装Cursor编程软件1.访问Cursor网站下载Linux版本的AppImage文件2.如果出现“dlopen():errorloadinglibfuse.so.2”错误,需要安装fuse。3.将Cursor添加到应用程序列表4.保存.desktop文件,Cursor就会出现在应用程序列表中。5.如果出现点击curs......
  • 深入探究MySQL游标(Cursor)
    前言MySQL游标(Cursor)是MySQL中用于处理查询结果的一种机制。游标允许我们在查询结果集中逐行处理数据,而不是一次性获取所有数据。这对于处理大量数据非常有用,因为它可以减少内存消耗并提高性能。在MySQL中,游标主要用于存储过程和函数。一、游标的概念游标是一个数据库对......
  • Cursor是什么?基于ChatGPT代码编辑器的cursor如何使用?VS Code如何迁移到Cursor的步骤
    Cursor是什么Cursor是一个基于VisualStudioCode(VSCode)技术构建的高级代码编辑器,专为提高编程效率并更深度地整合AI功能而设计。它不仅继承了VSCode的强大功能和用户界面,还增加了专门针对AI支持的特色功能。Cursor和VSCode的关系Cursor是VSCode的一个分支,......
  • css23 CSS Links, Cursors
    https://www.w3schools.com/css/css_link.asp CSSLinks  WithCSS,linkscanbestyledinmanydifferentways.StylingLinksLinkscanbestyledwithanyCSSproperty(e.g.color,font-family,background,etc.).Examplea{  color:hotpink;}&l......
  • Archery 平台执行DDL error:Threads_connected exceeds its critical threshold
    在数据库管理平台Archery上定时任务执行DDL操作,第二天发现报错,报错信息如下:Errorcopyingrowsfrom`DB`.`TABLE_NAME`to`DB`.`_TABLE_NAME_new`:Threads_connected=1358exceedsitscriticalthreshold1300登录查看Threads_connected信息,Threads_connected一直处于大......