Oracle ¾Û¼¯
http://blog.csdn.net/junmail/archive/2009/07/29/4392264.aspx
¾Û¼¯(cluster)ÊÇ´æ´¢±íÊý¾ÝµÄ¿ÉÑ¡ÔñµÄ·½·¨¡£Ò»¸ö¾Û¼¯ÊÇÒ»×é±í£¬½«¾ßÓÐͬһ¹«¹²ÁÐÖµµÄÐд洢ÔÚÒ»Æ𣬲¢ÇÒËüÃǾ³£Ò»ÆðʹÓá£ÕâЩ¹«¹²Áй¹³É¾Û¼¯Âë¡£
¾³£±»Í¬Ê±·ÃÎʵıíÔÚÎïÀíλÖÃÉÏ¿ÉÒÔ´æ´¢ÔÚÒ»Æð¡£ÎªÁ˽«ËüÃÇ´æ´¢ÔÚÒ»Æ𣬾ÍÒª´´½¨Ò»¸ö´Ø( c l u s t e r )À´¹ÜÀíÕâЩ±í¡£±íÖеÄÊý¾ÝÒ»Æð´æ´¢ÔÚ´ØÖУ¬´Ó¶ø×îС»¯±ØÐëÖ´ÐеÄI / O´ÎÊý£¬¸ÄÉÆϵͳÐÔÄÜ¡£
±íÖÐÏà¹ØµÄÁгÆΪ´Ø¼ü(cluster key)¡£´Ø¼üÓÃÒ»¸ö´ØË÷Òý(cluster index)À´½øÐÐË÷Òý£»¶ÔÓÚ´ØÖеĶà¸ö±í£¬´Ø¼üÖµÖ»´æ´¢Ò»´Î¡£ÔÚ°ÑÈκÎÐвåÈë´ØµÄ±íÖÐ֮ǰ£¬¶¼±ØÐëÏÈ´´½¨Ò»¸ö´ØË÷Òý¡£¶ÔÓÚ¾³£Æµ·±Ò»Æð²éѯµÄ±í˵£¬Ê¹ÓôرȽϷ½±ã¡£ÔÚ´ØÖУ¬À´×Ô²»Í¬±íµÄÐд洢ÔÚͬһ¸ö¿éÖУ»Òò´Ëͬ½«±í·Ö¿ª´æ´¢Ïà±È£¬Á¬½ÓÕâЩ±íµÄ²éѯ¾Í¿ÉÄÜÖ´ÐиüÉÙµÄI / O¡£²»¹ý£¬Óë¶Ô·Ç¡£´Ø±íµÄÏàͬ²Ù×÷±È½Ï£¬´Ø±íµÄ²åÈë¡¢¸üкÍɾ³ýÐÔÄÜÒª²îºÜ¶à¡£Ôھ۴رí֮ǰ£¬ÒªÅжϹ²Í¬²éѯÕâЩ±íµÄƵÂÊ¡£Èç¹ûÕâЩ±í×ÜÊÇÒ»Æð²éѯ£¬¾ÍÒª¿¼ÂÇ°ÑËüÃǺϲ¢³ÉÒ»¸ö±í¶ø²»ÊǾ۴ØÁ½¸ö±í¡£
Examples
1¡¢Creating a Cluster: Example
The following statement creates a cluster named personnel with the cluster key column department, a cluster size of 512 bytes, and storage parameter values:
CREATE CLUSTER personnel
(department NUMBER(4))
;
2¡¢Cluster Keys: Example
The following statement creates the cluster index on the cluster key of personnel:
CREATE INDEX idx_personnel ON CLUSTER personnel;
After creating the cluster index, you can add tables to the index and perform DML operations on those tables.
3¡¢Adding Tables to a Cluster: Example
The following statements create some departmental tables from the sample hr.employees table and add them to the personnel cluster created in the earlier example:
CREATE TABLE dept_10
CLUSTER personnel (department_id)
AS SELECT * from employees WHERE department_id = 10;
CREATE TABLE dept_20
CLUSTER personnel (department_id)
AS SELECT * from employees WHERE department_id = 20;
ÊÔÑ飺´´½¨±ítesta¡¢testb¡¢²¢ÉèÖÃa01¡¢b01¹²Óþۼ¯testclu
&nb
Ïà¹ØÎĵµ£º
OracleÊý¾Ý×ֵ䳣Óòéѯ
--²é¿´µ±Ç°Óû§ËùÓÐ±í¼°ÃèÊö
select o.object_name,c.comments
from user_objects o
left outer join user_tab_comments c
on o.object_name=c.table_name
where object_type='TABLE'
and c.comments like '%ÏîÄ¿%'
--²é¿´µ±Ç°Óû§ËùÓÐ×Ö¶ÎÐÅÏ¢¼°ÃèÊö
select c.table ......
Oracle job ¹ÜÀí
SVRMGR> select * from dba_jobs;
³õʼ»¯Ïà¹Ø²ÎÊýjob_queue_processes
alter system set job_queue_processes=39 scope=spfile;//×î´óÖµ²»Äܳ¬¹ý1000 ;job_queue_interval = 10 //µ÷¶È×÷ҵˢÐÂƵÂÊÃëΪµ¥Î»
DBA_JOBS describes all jobs in the database.
USER_JO ......
---------Êýѧº¯Êý
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:select cast(-1.002 as int) v ......
OracleÊý¾Ýµ¼Èëµ¼³öimp/expÃüÁî
Oracle Êý¾Ýµ¼Èëµ¼³öimp/exp¾ÍÏ൱ÓÚoracleÊý¾Ý»¹ÔÓ뱸·Ý¡£expÃüÁî¿ÉÒÔ°ÑÊý¾Ý´ÓÔ¶³ÌÊý¾Ý¿â·þÎñÆ÷µ¼³öµ½±¾µØµÄdmpÎļþ£¬impÃüÁî¿ÉÒÔ°Ñ dmpÎļþ´Ó±¾µØµ¼Èëµ½Ô¶´¦µÄÊý¾Ý¿â·þÎñÆ÷ÖС£ ÀûÓÃÕâ¸ö¹¦ÄÜ¿ÉÒÔ¹¹½¨Á½¸öÏàͬµÄÊý¾Ý¿â£¬Ò»¸öÓÃÀ´²âÊÔ£¬Ò»¸öÓÃÀ´ÕýʽʹÓá£
Ö´Ðл ......
OracleÊý¾Ý¿âÔÚʹÓùý³ÌÖУ¬Ëæ×ÅÊý¾ÝµÄÔö¼ÓÊý¾Ý¿âÎļþÒ²Öð½¥Ôö¼Ó£¬ÔÚ´ïµ½Ò»¶¨´óСºóÓпÉÄÜ»áÔì³ÉÓ²Å̿ռ䲻×ã;ÄÇôÕâʱÎÒÃÇ¿ÉÒÔ°ÑÊý¾Ý¿âÎļþÒƶ¯µ½ÁíÒ»¸ö´óµÄÓ²ÅÌ·ÖÇøÖС£ÏÂÃæÎÒ¾ÍÒÔOracle for Windows°æ±¾ÖаÑCÅ̵ÄÊý¾Ý¿âÎļþÒƶ¯µ½DÅÌΪÀý½éÉÜOracleÊý¾Ý¿âÎļþÒƶ¯µÄ·½·¨ºÍ²½Öè¡£
¡¡¡¡1.ÔÚsqlplusÖÐÁ¬½Óµ½ÒªÒƶ¯ÎļþµÄOr ......