SQL优化核心思想
上QQ阅读APP看书,第一时间看更新

本书约定

在阅读本书之前请读者安装好Oracle数据库并且配置好示例账户Scott,因为本书均以Scott账户进行讲解。推荐读者安装与本书相同版本的数据库进行测试,具有专研精神的读者请安装好Oracle12c进行对比实验,这样一来,你将发现Oracle12c CBO的一些新特征。本书使用的版本是Oracle11gR2。

SQL> select * from v$version where rownum=1;
BANNER
-------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
SQL> show user
USER is "SYS"
SQL> grant dba to scott;
Grant succeeded.
SQL> alter user scott account unlock;
User altered.
SQL> alter user scott identified by tiger;
User altered. 
SQL> conn scott/tiger
Connected.
SQL> create table test as select * from dba_objects;
Table created.