Oracle参数小结
一. 普通参数 SELECT num,name,value,isdefault FROM v$parameter; [@more@]Isdefault : Indicates whether the parameter is set to the default value (TRUE) or the parameter value was specified in the parameter file (FALSE). Issys_modifiable : Indicates whether the parameter can be changed with ALTER SYSTEM and when the change takes effect: IMMEDIATE - Parameter can be changed with ALTER SYSTEM regardless of the type of parameter file used
How to make CBO use Index Skip Scan
Create a concatenated index on table ITEM.[@more@] SQL> create index idx_item on item(create_by,item_type_code,item_class_id); SQL> select * from item where create_by='SCM OL Maint Conv'; Execution Plan ---------------------------------------------------------- 0 SELECT STATEMENT O
Using some data dictionary views in PLSQL with ORA-00942 occuring
When you try to use some data dictionary views such as v$, dba_ in a procedure, you may receive an error “ORA-00942: table or view does not exist”. At the same time, you can select the views within SQL under the same schema. I don’t understand the reason, while I find a approach to solve the problem, which you need to grant certain privileges to the user explicitly. [@more@] [oracle@oracleserver oracle]$ sqlplus s/s SQL> select value from v$parameter whe
Oracle 10g New Features - AWR - Basical Conception
1. What is AWR?[@more@] AWR stands for “Automatic Workload Repository“, which installs along with the database. Basically, AWR is an Oracle built-in tool that collects performance related statistics during database operation and derives performance metrics from them to track a potential problem. Unlike Statspack, snapshots are collected automatically every hour by a new background process called MMON and its slave processes. To save space, the captured dat
史上最强的几道oracle面试题
在ctocio.com.cn上看到3道Oracle面试题,据说如果10分钟内能够全部回答正确,就说明你应该具备一个OCP所具有的思考能力。看似可以脱口而出的答案,在仔细思考后发现自己最开始的答案都不对,晕啊!下面是题,答案是我写的并非标准答案,如果浏览这篇Blog的朋友发现有错,请指出。呵呵[@more@] (1) A 表中有100条记录。SELECT * FROM A WHERE A.COLUMN1 = A.COLUMN1; 这个语句返回几条记录? 答:返回column1 is not null的记录数 注意:select * from a where a.column1=a.column1;
NULL是不可被比较的
现象:[@more@]SQL> select * from bundle 2 where deactivate_date >= to_date('1000-01-01','yyyy-mm-dd') AND deactivate_date < null; no rows selected SQL> select * from bundle 2 where deactivate_date <= to_date('3000-01-01','yyyy-mm-dd') AND deactivate_date > null; no rows selected SQL> select * from bundle 2 where deactivate_date <= to_date('3000-01-01','yyyy-mm-dd') AND deactivate_date >= to_date('1000-01-01','yyyy-mm-dd'); 1112 rows selected.
BI项目中ETL设计与思考(转)
BI项目中ETL设计与思考(本文转自http://database.ctocio.com.cn/tips/409/7160909_2.shtml)[@more@] ETL即数据抽取(Extract)、转换(Transform)、装载(Load)的过程,它是构建数据仓库的重要环节 ETL是将业务系统的数据经过抽取、清洗转换之后加载到数据仓库的过程,目的是将企业中的分散、零乱、标准不统一的数据整合到一起,为企业的决策提供分析依据。 ETL是BI项目重要的一个环节。 通常情况下,在BI项目中ETL会花掉整个项目的1/3的时间,ETL设计的好坏直接关接到BI项目的成败。 ETL的设计分三部分:数据抽取
Oracle 临时表
Oracle Temporary Tables[@more@]1. 建立语法A.ON COMMIT DELETE ROWS 定义了建立事务级临时表的方法CREATE GLOBAL TEMPORARY TABLE TABLE_NAME-----(COUMNS …)-----AS SELECT … FROM TABLE…ON COMMIT DELETE ROWS; 当前session发出commit/rollback命令,则该事务周期发生的所有数据自动被Oracle删除(Oracle truncate table)。但不影响任何其他session的数据。 B.ON COMMIT PRESERVE ROWS 定义了创建会话级临时表的方法CREATE GLOBAL TEMPORARY TABLE TABLE_NAME-----(COUMNS …)-----AS SELECT … FROM TABLE…ON C