OracleÌṩÁË·ÖÇø¼¼Êõ(»ã×ÜÌû)
OracleÌṩÁË·ÖÇø¼¼ÊõÒÔÖ§³ÖVLDB(Very Large DataBase)¡£·ÖÇø±íͨ¹ý¶Ô·ÖÇøÁеÄÅжϣ¬°Ñ·ÖÇøÁв»Í¬µÄ¼Ç¼£¬·Åµ½²»Í¬µÄ·ÖÇøÖС£·ÖÇøÍêÈ«¶ÔÓ¦ÓÃ͸Ã÷¡£
OracleµÄ·ÖÇø±í¿ÉÒÔ°üÀ¨¶à¸ö·ÖÇø£¬Ã¿¸ö·ÖÇø¶¼ÊÇÒ»¸ö¶ÀÁ¢µÄ¶Î£¨SEGMENT£©£¬¿ÉÒÔ´æ·Åµ½²»Í¬µÄ±í¿Õ¼äÖС£²éѯʱ¿ÉÒÔͨ¹ý²éѯ±íÀ´·ÃÎʸ÷¸ö·ÖÇøÖеÄÊý¾Ý£¬Ò²¿ÉÒÔͨ¹ýÔÚ²éѯʱֱ½ÓÖ¸¶¨·ÖÇøµÄ·½·¨À´½øÐвéѯ¡£
·ÖÇøÌṩÒÔÏÂÓŵ㣺
ÓÉÓÚ½«Êý¾Ý·ÖÉ¢µ½¸÷¸ö·ÖÇøÖУ¬¼õÉÙÁËÊý¾ÝË𻵵ĿÉÄÜÐÔ£»
¿ÉÒÔ¶Ôµ¥¶ÀµÄ·ÖÇø½øÐб¸·ÝºÍ»Ö¸´£»
¿ÉÒÔ½«·ÖÇøÓ³Éäµ½²»Í¬µÄÎïÀí´ÅÅÌÉÏ£¬À´·ÖÉ¢IO£»
Ìá¸ß¿É¹ÜÀíÐÔ¡¢¿ÉÓÃÐÔºÍÐÔÄÜ¡£
OracleÌṩÁËÒÔϼ¸ÖÖ·ÖÇøÀàÐÍ£º
·¶Î§·ÖÇø£¨range£©£»
¹þÏ£·ÖÇø£¨hash£©£»
Áбí·ÖÇø£¨list£©£»
·¶Î§£¹þÏ£¸´ºÏ·ÖÇø£¨range-hash£©£»
·¶Î§£ÁÐ±í¸´ºÏ·ÖÇø£¨range-list£©¡£
OracleµÄÆÕͨ±íûÓа취ͨ¹ýÐÞ¸ÄÊôÐԵķ½Ê½Ö±½Óת»¯Îª·ÖÇø±í£¬±ØÐëͨ¹ýÖؽ¨µÄ·½Ê½½øÐÐת±ä£¬ÏÂÃæ½éÉÜÈýÖÖЧÂʱȽϸߵķ½·¨£¬²¢ËµÃ÷ËüÃǸ÷×ÔµÄÌص㡣
·½·¨Ò»£ºÀûÓÃÔ±íÖؽ¨·ÖÇø±í¡£
²½Ö裺
SQL> CREATE TABLE T (ID NUMBER PRIMARY KEY, TIME DATE);
±íÒÑ´´½¨¡£
SQL> INSERT INTO T SELECT ROWNUM, CREATED from DBA_OBJECTS;
ÒÑ´´½¨6264ÐС£
SQL> COMMIT;
Ìá½»Íê³É¡£
SQL> CREATE TABLE T_NEW (ID, TIME) PARTITION BY RANGE (TIME)
2 (PARTITION P1 VALUES LESS THAN (TO_DATE('2004-7-1', 'YYYY-MM-DD')),
3 PARTITION P2 VALUES LESS THAN (TO_DATE('2005-1-1', 'YYYY-MM-DD')),
4 PARTITION P3 VALUES LESS THAN (TO_DATE('2005-7-1', 'YYYY-MM-DD')),
5 PARTITION P4 VALUES LESS THAN (MAXVALUE))
6 AS SELECT ID, TIME from T;
±íÒÑ´´½¨¡£
SQL> RENAME T TO T_OLD;
±íÒÑÖØÃüÃû¡£
SQL> RENAME T_NEW TO T;
±íÒÑÖØÃüÃû¡£
SQL> SELECT COUNT(*) from T;
COUNT(*)
----------
6264
SQL> SELECT COUNT(*) from T PARTITION (P1);
COUNT(*)
----------
0
SQL> S
Ïà¹ØÎĵµ£º
1¡¢´´½¨´æ´¢¹ý³Ì
create or replace procedure test(var_name_1 in type,var_name_2 out type) as
--ÉùÃ÷±äÁ¿(±äÁ¿Ãû ±äÁ¿ÀàÐÍ)
begin
--´æ´¢¹ý³ÌµÄÖ´ÐÐÌå
end test;
´òÓ¡³öÊäÈëµÄʱ¼äÐÅÏ¢
E.g:
create or replace procedure test(workDate in Date) is
begin
dbms_output.putline('The input date is: ......
1.»ù±¾½á¹¹
CREATE OR REPLACE PROCEDURE ´æ´¢¹ý³ÌÃû×Ö
(
²ÎÊý1 IN NUMBER,
²ÎÊý2 IN NUMBER
) IS
±äÁ¿1 INTEGER :=0;
±äÁ¿2 DATE;
BEGIN
END ´æ´¢¹ý³ÌÃû×Ö
2.SELECT INTO STATEMENT
½«select²éѯµÄ½á¹û´æÈëµ½±äÁ¿ÖУ¬¿ÉÒÔͬʱ½«¶à¸öÁд洢¶à¸ö±äÁ¿ÖУ¬±ØÐëÓÐÒ»Ì ......
¡¡¡¡
¡¡¡¡±¾Êé×÷Ϊһ±¾´´×÷Ö®³õ¾Í¶¨Î»ÓÚ¼¼ÊõÓ¦ÓõÄʵ¼ù²Î¿¼Ê飬ËäȻǰǰºóºó´®ÁªÁËOracleÊý¾Ý¿âÖÐÊ®Óà¸ö³£ÓÃÌØÐÔ»ò¹¤¾ß£¬µ«ÔÚÕ½ڵÄÉè¼ÆÉÏÍêÈ«×ñÑÕâÒ»ÀíÄî¡£ÔÚÉæ¼°ÌØÐÔ»ò¹¤¾ßÓ¦ÓõÄÿһ¸öÕ½ڣ¬¾ùÓÐÏà¹ØʵÀýÑÝʾÈçºÎÓ¦Óã¬ËùÓÐʾÀýµÄ×îÖÕÄ¿µÄ£¬¾ÍÊÇÏ£ÍûÔĶÁ±¾ÊéµÄÅóÓÑ£¬Äܹ»½«Ë«ÊÖ½â·Å³öÀ´£¬×ÔÐÅÁé»îµØʹÓÃÊéÖнéÉܵĸ÷Ï ......
ÒÔÏ»شðÊôÓÚתÔØ£º
¾³£¿´µ½Ò»Ð©ÅóÓÑÎÊORACLE×Ö·û¼¯·½ÃæµÄÎÊÌ⣬ÎÒÏëÒÔµü´úµÄ·½Ê½À´½éÉÜһϡ£
µÚÒ»´Îµü´ú£ºÕÆÎÕ×Ö·û¼¯·½ÃæµÄ»ù±¾¸ÅÄî¡£
ÓÐЩÅóÓÑ¿ÉÄÜ»áÈÏΪÕâÊǶà´ËÒ»¾Ù£¬µ«Êµ¼ÊÉÏÕýÊÇÓÉÓÚ¶ÔÏà¹Ø»ù±¾¸ÅÄî°ÑÎÕ²»Ç壬²Åµ¼ÖÂÁËÖî¶àÎÊÌâºÍÒÉÎÊ¡£
Ê×ÏÈÊÇ×Ö·û¼¯µÄ¸ÅÄî¡£
ÎÒÃÇÖªµÀ£¬µç×Ó¼ÆËã»ú×î³õÊÇÓÃÀ´½øÐпÆѧ¼ÆËãµÄ£¨Ë ......
Close a Database
When you close a database, Oracle writes all database data and recovery data in the SGA to the datafiles and redo log files, respectively. Next, Oracle closes all online datafiles and redo log files. (Any offline datafiles of any offline tablespaces have been closed already. If you ......