17.08.02
instead of trigger视图触发器
replace
序列:
SQL> create sequence test_seq increment by 1 start with 1 maxvalue 1000 nocycle cache 20;
SQL> create table t1(x int primary key, y int);
SQL> insert into t1 values (test_seq.nextval, 11); 反复执行
SQL> select * from t1;
索引:
主键和唯一性约束自动创建索引:
SQL> select constraint_name, constraint_type from user_constraints where table_name='EMPLOYEES';
SQL> select index_name, index_type from user_indexes where table_name='EMPLOYEES';
SQL> set autot on
SQL> select last_name from employees where employee_id=100; 走索引
SQL> select email from employees; 走索引
SQL> select last_name from employees where salary=2100; 全表扫描
SQL> create index emp_salary_ix on employees(salary);
SQL> select last_name from employees where salary=2100; 走索引
SQL> set autot off
User process:用户进程
Server process:服务器进程
Shared pool:共享池
Library cache:库高速缓存
Data dict cache:数据字典高速缓存
Database buffer cache:数据库缓冲区高速缓存
Redo log buffer cache:重做日志缓冲区
Parameter file:参数文件
Password file:口令文件
Data files:数据文件
Control files:控制文件
Redo log buffer cache:重做日志文件
Archived log files:归档日志文件
视图:保持数据的独立性
视图不允许做dml操作