ORACLE查询或删除时指定使用索引的写法
查询时可以指定使用索引的写法。
SELECT /*+ index(TB_ALIAS IX_G_COST3) */
TB_ALIAS.*
from g_Cost TB_ALIAS
WHERE Item_Two = 0
AND Flight_Date >= To_Date('20061201', 'YYYYMMDD')
AND Flight_Date <= To_Date('20061231', 'YYYYMMDD');
删除时也可以指定使用索引的写法。
DELETE /*+ index(TB_ALIAS IX_G_COST1) */
from g_Cost TB_ALIAS
WHERE ITEM_NAME = '小时费';
IX_G_COST1,IX_G_COST3都是表G_COST的索引。
相关文档:
最近学了servlet和oracle,也就把他们结合下,做个分页的页面出来。算是一种复习吧。
1.首先是oracle的分页显示SQL语句:
select * from(select a.*, rownum rn from (select * from Person) a where rownum <= MaxN ......
是想生成GUID吗?
SQL> select sys_guid() from dual ;
SYS_GUID()
--------------------------------
F18031C69D8345DEB305D4B2E796A282
你可以把表的主键字段的缺省值设为sys_guid()
insert into luxian_info (id) values(sys_guid()); ......
一、ORACLE的启动和关闭
1、在单机环境下要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下
su - oracle
a、启动ORACLE系统
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b、关闭ORACLE系统
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>shutdow ......
--1:无ORDER BY排序的写法。(效率最高)
--(经过测试,此方法成本最低,只嵌套一层,速度最快!即使查询的数据量再大,也几乎不受影响,速度依然!)
SELECT *
from (Select ROWNUM AS ROWNO, T.*
from k_task T &s ......
1.GSD global services daemon
oracle官方文档的描述
The Global Services Daemon (GSD) runs on each node with one GSD process per node. The GSD coordinates with the cluster manager to receive requests from clients such as the DBCA, EM, and the SRVCTL utility to execute administrative ......