Ó²ÅÌÊý¾Ý»Ö¸´µ¼º½
RAIDÊý¾Ý»Ö¸´µ¼º½
 | ÍøÕ¾Ê×Ò³ | Êý¾Ý»Ö¸´×ÊÁÏ | Êý¾Ý»Ö¸´Èí¼þ | ×ÉѯÁôÑÔ | Êý¾Ý»Ö¸´²©¿Í | Êý¾Ý»Ö¸´ÂÛ̳ | 
Êý¾Ý»Ö¸´Èí¼þÏÂÔØ
¹«Ë¾¼ò½é Êý¾Ý»Ö¸´³É¹¦°¸Àý Êý¾Ý»Ö¸´±¨¼Û Êý¾Ý»Ö¸´Åàѵ Êý¾Ý»Ö¸´¼¼ÊõÎÄÕ Êý¾Ý»Ö¸´¿Í·þÖÐÐÄ Êý¾Ý»Ö¸´·þÎñÁªÏµ·½Ê½
ÄúÏÖÔÚµÄλÖ㺠±±ÑÇÊý¾Ý»Ö¸´¼¼ÊõÕ¾ >> Êý¾Ý»Ö¸´×ÊÁÏ >> Êý¾Ý»Ö¸´³£Ê¶ >> ÎÄÕÂÕýÎÄ
OracleϽ«·Ç·ÖÇø±íת»»Îª·ÖÇø±í            ¡¾×ÖÌ壺С ´ó¡¿
OracleϽ«·Ç·ÖÇø±íת»»Îª·ÖÇø±í
×÷ÕߣºÎ´Öª    ÎÄÕÂÀ´Ô´£ºÍøÂç    µã»÷Êý£º    ¸üÐÂʱ¼ä£º2009-5-7

ºÜ¶àÊý¾Ý¿âÔÚÉè¼ÆʱδÄܺܺõĹ滮Êý¾Ý¿âµÄÈÝÁ¿, µ¼ÖÂÔÚijЩÇé¿öÏÂ, µ¼ÖÂÒ»¸ö±íÖдæ·ÅÁËÊý°ÙÍò, ÊýǧÍòÉõÖÁÉÏÒÚÌõ¼Ç¼, ά»¤ÆðÀ´·Ç³£µÄ²»±ã, ÏÂÃæ½éÉÜÒ»ÖÖ½«·Ç·ÖÇø±íת»»Îª·ÖÇø±íµÄ·½·¨.
testtb_nopartÊÇÒ»¸ö·Ç·ÖÇø±í, »ù±¾ÐÅÏ¢ÈçÏÂ:
SQL> desc testtb_nopart
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 TIMESTAMP                                          DATE
 OWNER                                              VARCHAR2(30)
 ACTION                                             VARCHAR2(6)
 OBJECT_NAME                                        VARCHAR2(128)
 MESSENG                                            VARCHAR2(169)

SQL> select to_char(timestamp, 'mm-yyyy'), count(*) from testtb_nopart group by to_char(timestamp, 'mm-yyyy');

TO_CHAR   COUNT(*)
------- ----------
12-2005    2058125
11-2005    1363431
08-2005     150951
10-2005     628149
07-2005    1006340
09-2005     730410

6 rows selected.


´´½¨·ÖÇø±ítesttb_part, ½á¹¹ºÍtesttb_nopartÒ»ÖÂ.
create table testtb_part (timestamp date, owner varchar2(30), action varchar2(6), object_name varchar2(128) , messeng varchar2(169))
tablespace testts
partition by range(timestamp)(
partition rest values less than (maxvalue))


½»»»testtb_nopartºÍtesttb_partÖÐpart·ÖÇøµÄÊý¾Ý
SQL> alter table testtb_part exchange partition rest with table testtb_nopart;

Table altered.

SQL> select to_char(timestamp, 'mm-yyyy'), count(*) from testtb_nopart group by to_char(timestamp, 'mm-yyyy');

no rows selected

SQL> c/nopart/part/
  1* select to_char(timestamp, 'mm-yyyy'), count(*) from testtb_part group by to_char(timestamp, 'mm-yyyy')
SQL> /

TO_CHAR   COUNT(*)
------- ----------
12-2005    2058125
11-2005    1363431
08-2005     150951
10-2005     628149
07-2005    1006340
09-2005     730410

6 rows selected.


testtb_nopartÖдóÔ¼ÓÐ50ÍòÌõ¼Ç¼, Õ¼ÓÃ600m×óÓÒ¿Õ¼ä, ½»»»´óÔ¼ÓÃÁ˲»µ½30ÃëÖÓ, testtb_partºÍtesttb_nopartËùÔڵıí¿Õ¼äҲûÓÐÃ÷ÏÔÔö³¤.

¶Ôrest·ÖÇø½øÐвð·Ö
SQL> alter table testtb_part split partition rest at (to_date('200508','yyyymm'))
  2  into (partition part08, partition rest);

Table altered.

SQL>  alter table testtb_part split partition rest at (to_date('200509','yyyymm'))
  2  into (partition part08, partition rest);

Table altered.

SQL>  alter table testtb_part split partition rest at (to_date('200510','yyyymm'))
  2   into (partition part09, partition rest);

Table altered.

SQL>  alter table testtb_part split partition rest at (to_date('200511','yyyymm'))
  2  into (partition part10, partition rest);

Table altered.

SQL> alter table testtb_part split partition rest at (to_date('200512','yyyymm'))
  2  into (partition part11, partition rest);

Table altered.

SQL> alter table testtb_part split partition rest at (to_date('200601','yyyymm'))
  2  into (partition part12, partition rest);

Table altered.


×îºó¿ÉÒÔÖØÃüÃû±í, ʹµÃת»»¹ý³Ì²»Ó°ÏìÓû§³ÌÐò.
alter table testtb_part rename to testtb_nopart

ÎÄÕ¼È룺a    ÔðÈα༭£ºa 
  • ÉÏһƪÎÄÕ£º

  • ÏÂһƪÎÄÕ£º
  • ¡¾·¢±íÆÀÂÛ¡¿¡¾¼ÓÈëÊղء¿¡¾¸æËߺÃÓÑ¡¿¡¾´òÓ¡´ËÎÄ¡¿¡¾¹Ø±Õ´°¿Ú¡¿
    ÍøÓÑÆÀÂÛ£º£¨Ö»ÏÔʾ×îÐÂ10Ìõ¡£ÆÀÂÛÄÚÈÝÖ»´ú±íÍøÓѹ۵㣬Óë±¾Õ¾Á¢³¡Î޹أ¡£©
    ¹ØÓÚÎÒÃÇ | RAIDÊý¾Ý»Ö¸´ | ÓÑÇéÁ´½Ó | RSSÉú³É | XMLÉú³É | ÎÄÕÂHTMLµØͼ | ÏÂÔØHTMLµØͼ

    °æȨËùÓÐ ±±ÑÇÊý¾Ý»Ö¸´ÖÐÐÄ
    È«¹úͳһ¿Í·þµç»°:4006-505-808
    ±±¾©Êк£µíÇøÓÀ·á»ùµØ·á»ÛÖз7ºÅвÄÁÏ´´Òµ´óÏÃB×ù205ÊÒ
    ¾©ICP±¸05011939
    oÇa f