Oracle
billdwl
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
利用ORACLE的MINUS函数和OVER函数,直接通过视图实现两个记录集的比较。(转载) ...
1 前言 ------------------------------------------------------------- 在程序设计过程中,往往遇到比较两个记录集的差异。如,判断原来传入的订单资料与后来传入的订单资料之间的差异,并且将差异的数据显示给用户。 实现的方式有多种,如编程存储过程返回游标,在存储过程中对两批数据进行比较...等等,当然返回差异数据的方式多种多样,既可以是...原创 2011-09-28 21:41:10 · 166 阅读 · 0 评论 -
Understanding Oracle QUERY PLAN
Understanding Oracle QUERY PLAN What is Query Execution Plan?When you fire an SQL query to Oracle, Oracle first comes up with a query execution plan in order to fetch the desired data from the ...原创 2012-01-06 11:28:15 · 201 阅读 · 0 评论 -
Oracle Session 视图[转]
v$sessionv$session_waitv$session_wait_historyv$active_session_history 1、v$session:连接将产生会话,当前会话的信息保存在v$session中,连接断开后消失;2、v$session_wait:将当前会话中正在等待的会话状态复制一份到视图,断开后消失(等待会话生命周期最后1次等待);3、v...原创 2013-03-06 10:17:35 · 188 阅读 · 0 评论 -
表分区分割脚本
表分区分割脚本原创 2013-03-12 13:10:00 · 125 阅读 · 0 评论 -
Oracle sys和system用户、sysdba 和sysoper系统权限、sysdba和dba角色的区别 [转]
sys和system用户区别1)最重要的区别,存储的数据的重要性不同sys所有oracle的数据字典的基表和视图都存放在sys用户中,这些基表和视图对于oracle的运行是至关重要的,由数据库自己维护,任何用户都不能手动更改。sys用户拥有dba,sysdba,sysoper等角色或权限,是oracle权限最高的用户。 system用户用于存放次一级的内部数据,如oracle的...原创 2013-03-12 14:17:51 · 159 阅读 · 0 评论 -
[转]Optimizing SPLIT PARTITION and SPLIT SUBPARTITION Operations
Optimizing SPLIT PARTITION and SPLIT SUBPARTITION Operations Oracle Database implements a SPLIT PARTITION operation by creating two newpartitions and redistributing the rows from the par...原创 2012-11-27 15:11:49 · 195 阅读 · 0 评论 -
Oracle splitting partitions简单小结[转]
http://www.oracleonlinux.cn/2012/09/oracle-splitting-partitions/ 本文简单记录在Oracle 10g数据库上对范围分区表的Splitting Partitions测试过程和结论,并不涉及到Oracle数据库中分区技术的详细描述。1 测试环境及平台:OS: 1[root@localhos...原创 2012-11-27 15:12:39 · 194 阅读 · 0 评论 -
[转]Oracle中Left Outer Join和外关联(+)的区别
外关联是Oracle数据库的专有语句Left Outer Join则是SQL-92的标准语句通常认为这两个SQL是可以等效的,但还是有些细微的差别。一般说来,外关联的等值条件等效于Left Outer Join中的on语句;两个where中其他语句是一样的。但是Left Outer Join中的其他条件(非表连接)出现在On关键词后面还是出现在Where关键词后面是不一样的,这样的...原创 2012-11-27 15:15:48 · 158 阅读 · 0 评论 -
oracle的number类型精度、刻度范围 [转]
一、 oracle 的 number 类型精度、刻度范围 number(p,s)p: 1---38s: -84---127有效数位 :从左边第一个不为 0 的数算起,到末位数字为止的所有数字,小数点和负号不计入有效位数。 p>0 ,对 s 分 3 种情况: 1.s>0 精确到小数点右边 s 位,并四舍五入 。然后检验有效数位是否 <= p ; ZWF.YUDONG>cr...原创 2013-02-26 15:06:52 · 632 阅读 · 0 评论 -
Oracle 表连接 [转]
Oracle 表之间的连接分为三种:1. 内连接(自然连接)2. 外连接(1)左外连接 (左边的表不加限制) (2)右外连接(右边的表不加限制) (3)全外连接(左右两表都不加限制)3. 自连接(同一张表内的连接) SQL的标准语法:select table1.column,table2.columnfrom table1 [inner ...原创 2013-02-26 15:20:09 · 124 阅读 · 0 评论 -
Oracle AUTOTRACE Explained
Oracle AUTOTRACE Explained AUTOTRACE is a beautiful utility in Oracle that can help you gather vital performance statistics for a SQL Query. You need to understand and use it for SQL Query Tun...原创 2012-01-06 11:04:25 · 167 阅读 · 0 评论 -
V$session表的使用
v$session 表中比较常用的几个字段说明1. sid,serial# 通过sid我们可以查询与这个session相关的各种统计信息,处理信息.a. select * from v$sesstat where sid = :sid; 查询用户相关的各种统计信息. select a.sid,a.statistic#,b.name,a.valuefrom v$sesstat a,v$st...原创 2012-01-04 11:49:22 · 188 阅读 · 0 评论 -
dbms_profiler
dbms_profilerClick here for the paper I presented at IOUG in 2006 on Trace Analyzer. PL/SQL developers are always trying to optimize their code to perform more efficiently. As of Oracle 8.1.5,...原创 2012-01-04 11:14:38 · 182 阅读 · 0 评论 -
Oracle 语法之 OVER (PARTITION BY ..) 及开窗函数 转载
oracle的分析函数over 及开窗函数一:分析函数overOracle从8.1.6开始提供分析函数,分析函数用于计算基于组的某种聚合值,它和聚合函数的不同之处是对于每个组返回多行,而聚合函数对于每个组只返回一行。 下面通过几个例子来说明其应用。 1:统计某商店的营业额。 dat...原创 2011-09-28 21:50:57 · 105 阅读 · 0 评论 -
Oracle Locking Survival Guide
Oracle Locking Survival GuideOverviewIn multi-user systems, many users may update the same information at the same time. Locking allows only one user to update a particular data block; a...原创 2011-08-10 15:47:56 · 207 阅读 · 0 评论 -
Get the TableSpace usage in Oracle
1.To get the table space usage in oracle use this query: SELECT a.tablespace_name, ROUND(a.bytes / 1024000) 'Used (MB)', ROUND(b.bytes / 1024000) 'Free (MB)', ROUND(((a.bytes -b.bytes) / a.bytes...原创 2011-08-11 14:32:59 · 164 阅读 · 0 评论 -
sql之left join、right join、inner join的区别
left join(左联接) 返回包括左表中的所有记录和右表中联结字段相等的记录 right join(右联接) 返回包括右表中的所有记录和左表中联结字段相等的记录inner join(等值连接) 只返回两个表中联结字段相等的行举例如下: --------------------------------------------表A记录如下:aID aNum1 a200501...原创 2011-08-12 14:36:41 · 86 阅读 · 0 评论 -
Oracle's DBMS_PROFILER: PL/SQL Performance Tuning
By Amar Kumar Padhi <!--content_start-->An application can always be fine-tuned for better performance with the use of better alternatives or with the new features introduced with every rele...原创 2011-08-12 14:57:44 · 170 阅读 · 0 评论 -
DBMS_PROFILER Report for SQL Developer
Oracle SQL Developer offers the ability to create reports with graphs in it. A number of reports are included with the tool, unfortunately a report which shows information based on DBMS_PROFILER bui...原创 2011-08-12 15:04:52 · 131 阅读 · 0 评论 -
Oracle and SQL Server Data Type Mapping
2.2 Data TypesThis chapter provides detailed descriptions of the differences in data types used by Microsoft SQL Server and Oracle databases. Specifically, this chapter contains the following inf...原创 2011-08-15 14:48:34 · 218 阅读 · 0 评论 -
String Aggregation Techniques
String Aggregation TechniquesOn occasion it is necessary to aggregate data from a number of rows into a single row, giving a list of data associated with a specific value. Using the SCOTT.EMP table ...原创 2012-01-04 09:46:39 · 106 阅读 · 0 评论 -
Oracle Partition维护之 - tabel / index分区命令
分区表维护的常用命令:ALTER TABLE-- DROP -- PARTITION-- ADD |-- RENAME |-- MODIFITY |-- TRUNCATE |-- SPILT |-- MOVE |-- EXCHANGE | 分区索引的常用维护命令:ALTER INDEX-- DROP -- PARTITION-- REBUILD |-- RENAME |-- M...原创 2012-01-04 10:59:10 · 247 阅读 · 0 评论 -
10G中查看历史执行计划信息[转]
现在总结下10G的,使用的是AWR报告中的信息,主要是查询以下四个视图:DBA_HIST_SQLTEXT、DBA_HIST_SQL_PLAN、DBA_HIST_SQLSTAT、DBA_HIST_SNAPSHOT。Sometimes you will receive complains from users that something that has been running ok fo...原创 2013-03-01 11:02:56 · 176 阅读 · 0 评论
分享