Conn Scott/tiger;grant insert,update,delete on EMP to System;conn system/orcl1234;create or replace VIEW V_empas select em Pno,ename,job,hiredate,deptno from Scott.emp;
Index
In order to improve the speed of the query, when the user is not satisfied with the query speed and needs to adjust the performance of the database, it is preferred to establish an index.
CREATE INDEX idx_ename on employee (ename, Sal DESC);
Proper use of indexes can improve the speed of data retrieval and can create indexes on fields that frequently require queries.
When you add rows to a table or delete rows from a table, you must spend extra time updating the index of the table, so when you need to retrieve a few rows from a large table, you create the index. Generally we think indexes are useful when any single query is to retrieve rows that are less than 10% of the total row count of the entire table.
The table's primary key and unique key will automatically create the index.
PL/SQL Programming (iii) package and package body, triggers, views, indexes