Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ͨ¹ý·ÖÇø£¨Partition£©ÌáÉýMySQLÐÔÄÜ

 
ͨ¹ý·ÖÇø£¨Partition£©ÌáÉýMySQLÐÔÄÜ
×÷Õߣºfoxcai À´Ô´:foxcai µÄ Blog (2006-05-08 14:30:34)
ͨ¹ý·ÖÇø£¨Partition£©ÌáÉýMySQLÐÔÄÜ
               ——MySQL5.1ÐÂÌØÐÔ·­ÒëϵÁÐ
¼¸ÄêÇ°£¬°³Ð´¹ýһƪÌâΪ“The Foundation of Excellent Performance”µÄÎÄÕÂ(ÏÖÔÚÈÔÈ»¿ÉÒÔÔÚhttp://www.tdan.com/i016fe03.htm¿´µ½)£¬°³¶ÔSQLÓï¾äÊÇÓ°ÏìÊý¾Ý¿âÇý¶¯ÏµÍ³ÐÔÄܵĵÚÒ»ÒªËصĹ۵ãÓеãÖÊÒÉ¡£ÆäʵÔÚÄÇʱÎÒÔÚÎÄÕÂÖоͼáÐÅÊý¾Ý¿âµÄÎïÀíÉè¼ÆÔڶԸ߼¶Êý¾Ý¿âµÄÐÔÄÜÓ°ÏìÉÏÔ¶±ÈÆäËûÒòËØÖØÒª¡£Í¬Ê±°³»¹¸ø´ó¼Ò¿´ÁËOracleµÄÑо¿£¬ËûÃǽâÊÍÁËΪʲô׾ÁÓµÄÎïÀíÉè¼ÆÊÇÊý¾Ý¿âÍ£»ú£¨ÎÞÂÛÊÇÓмƻ®µÄ»¹ÊÇû¼Æ»®µÄ£©±³ºóµÄÖ÷ÒªÔ­Òò¡£Õâô¶àÄ궼¹ýÀ´À²£¨ÐÒºÃû¶àÉÙÈ˳¯°³ÈÓשͷ£©£¬°³µÄ¹ÛµãÊǸıäÁËһЩ£¬µ«ÔÚÕâµãÉÏ°³»¹ÊǼá³ÖDBAÈç¹ûÏëÒª¸ßÐÔÄܵÄÊý¾Ý¿â¾Í±ØÐëÔÚÊý¾Ý¿âµÄÎïÀíÉè¼ÆÉ϶à˼¿¼µÄ¹Ûµã£¬ÕâÑù²ÅÄܼõÉÙÏìӦʱ¼äʹÖÕ¶ËÓû§ÂúÒâ¶ø²»ÊÇÒýÀ´ÂîÉùһƬ¡££¨³ÂÅóÞÈÓ²»ÒªÄÇôÑÏË࣬ºÙºÙ£©
°³½ñÌìÕâô¼¤¶¯ÓÖÏëдÎÄÕµÄÔ­ÒòÊÇMySQL5.1µÄ·¢²¼´øÀ´ÁËÉè¼Æ³¬Ç¿¶¯Á¦Êý¾Ý¿âµÄÇ¿ÓÐÁ¦µÄÎäÆ÷£¬ÈκÎMySQLµÄDBA¶¼Ó¦¸Ã¾¡¿ìѧϰ²¢Ê¹ÓÃËü¡£°³¾õµÃÈç¹ûÄܺܺõÎʹÓÃÕâ¸ö5.1°æ´øÀ´µÄÐÂÌØÐÔ£¬DBA¿ÉÒÔʹ×Ô¼º¹ÜÀíµÄVLDB£¨²»ÖªµÀʲôÊÇVLDB£¿¸æËßÄ㣬ÊǺôóºÃ´óµÄÊý¾Ý¿âµÄÒâ˼£¬Very Large DB£©»òÊý¾Ý²Ö¿âÆæ¼£°ãµÄ»ñµÃ¾Þ´óµÄÐÔÄÜÌáÉý¡£
ʲôÊÇÊý¾Ý¿â·ÖÇø£¿
Êý¾Ý¿â·ÖÇøÊÇÒ»ÖÖÎïÀíÊý¾Ý¿âÉè¼Æ¼¼Êõ£¬DBAºÍÊý¾Ý¿â½¨Ä£ÈËÔ±¶ÔÆäÏ൱ÊìϤ¡£ËäÈ»·ÖÇø¼¼Êõ¿ÉÒÔʵÏֺܶàЧ¹û£¬µ«ÆäÖ÷ҪĿµÄÊÇΪÁËÔÚÌض¨µÄSQL²Ù×÷ÖмõÉÙÊý¾Ý¶ÁдµÄ×ÜÁ¿ÒÔËõ¼õÏìӦʱ¼ä¡£
·ÖÇøÖ÷ÒªÓÐÁ½ÖÖÐÎʽ£º//ÕâÀïÒ»¶¨Òª×¢ÒâÐкÍÁеĸÅÄrowÊÇÐУ¬columnÊÇÁУ©
ˮƽ·ÖÇø£¨Horizontal Partitioning£© ÕâÖÖÐÎʽ·ÖÇøÊǶԱíµÄÐнøÐзÖÇø£¬Í¨¹ýÕâÑùµÄ·½Ê½²»Í¬·Ö×éÀïÃæµÄÎïÀíÁзָîµÄÊý¾Ý¼¯µÃÒÔ×éºÏ£¬´Ó¶ø½øÐиöÌå·Ö¸î£¨µ¥·ÖÇø£©»ò¼¯Ìå·Ö¸î£¨1¸ö»ò¶à¸ö·ÖÇø£©¡£ËùÓÐÔÚ±íÖж¨ÒåµÄÁÐÔÚÿ¸öÊý¾Ý¼¯Öж¼ÄÜÕÒµ½£¬ËùÒÔ±íµÄÌØÐÔÒÀÈ»µÃÒÔ±£³Ö¡£
¾Ù¸ö¼òµ¥Àý×Ó£ºÒ»¸ö°üº¬Ê®Ä귢Ʊ¼Ç¼µÄ±í¿ÉÒÔ±»·ÖÇøΪʮ¸ö²»Í¬µÄ·ÖÇø£¬Ã¿¸ö·ÖÇø°üº¬µÄÊÇÆäÖÐÒ»ÄêµÄ¼Ç¼¡££¨ÅóÞÈ×¢£ºÕâÀï¾ßÌåʹÓõķÖÇø·½Ê½ÎÒÃǺóÃæÔÙ˵£¬¿ÉÒÔÏÈ˵һµã£¬Ò»¶¨ÒªÍ¨¹ýij¸öÊôÐÔÁÐÀ´·Ö¸î£¬Æ©ÈçÕâÀïʹÓõÄÁоÍÊÇÄê·Ý£©
´¹Ö±·ÖÇø£¨Vertical Partitioning£© ÕâÖÖ·ÖÇø·½Ê½Ò»°ãÀ´ËµÊÇͨ¹ý¶Ô±í


Ïà¹ØÎĵµ£º

¼ÌÐøÕª³­£º½ÌÄãÓÃPHPдMySQLÊý¾Ý¿âµÄÓû§ÈÏ֤ϵͳ

Óû§ÈÏÖ¤µÄÔ­ÀíºÜ¼òµ¥£ºÊ×ÏÈÐèÒªÓû§ÔÚÒ³ÃæÉÏÌîÈëÓû§ÃûºÍÃÜÂ룬µ±È»Ã»×¢²áµÄÓû§ÐèÒªÏÈ×¢²á¡£È»ºóµ÷ÓÃÊý¾Ý¿âËÑË÷ÊÇ·ñÓÐÏàÓ¦µÄÓû§¡£Èç¹ûÓоÍÈ·ÈÏ£¬Ã»ÓÐÔòÌáÐÑÓû§ÏÈ×¢²á¡£Ê¹ÓÃPHPÀ´Íê³ÉÕâÒ»Çкܼòµ¥£¬µ«ÐèҪעÒâµÄÊÇÈç¹ûÏëÔÚÒÔºóµÄÒ³ÃæÖж¼ÄÜÈ·ÈÏÓû§Éí·Ý¡£
µÚÒ»²½ÊÇ×öÒ»¸öµÇ¼µÄÒ³Ãæ¡£
µÚ¶þ²½¿ªÊ¼µÇ¼ºóµÄÈ·ÈϳÌÐòµÄÉ ......

JSP+MySqlµÄʱ¼ä´¦Àí

ºÜ¾ÃûÓÐÓÃMysqlÁË£¬·¢ÏÖССµÄʱ¼äÎÊÌâÒ²Óöµ½²»ÉÙÂé·³£¬ºÇºÇ
ËùÒÔ×ܽáһϣº
µÚÒ»ÖÖ:
Date time= new java.sql.Date(new java.util.Date().getTime());
µÚ¶þÖÖ:
java ÓÃPreparedStatementÀ´setDate,ÓÃÎʺŵÄÐÎʽ¸øÈÕÆÚÎʺŸ³Öµ
pstmt.setTimestamp(8, new Timestamp(System.currentTimeMillis()));  
pst ......

mysqlµÄÓ÷¨

 Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
Create DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4 ......

mysql µÄ×Ö·û±àÂë

 === ÉÔºóÔÙÕûÀí
mysql
4.0µ½mysql
5.0µÄÊý¾Ýµ¼Èë³öÏÖÂÒÂëµÄ½â¾ö·½°¸
×ÖÌå´óС£º´ó
| ÖÐ
| С
2007-02-08 17:09 -
ÔĶÁ£º485 - ÆÀÂÛ
£º0
×î½ü×ömysql
4.0µ½mysql
5.0µÄÊý¾Ýת»¯¹¤×÷£¬·¢ÏÖÂÒÂë
ÎÞÊý£¬¹Û²©¿ÍÎÞÊýÐĵÃÈçÏ£º
£ªmysql
ÖÐÎÄ亂碼µÄÔ­Òò
mysql
會³ö現ÖÐÎÄ ......

MySQLÔÓ

MySQLµÄtimestampÀàÐÍ×Ô¶¯¸üÐÂÎÊÌâ
 ½ñÌ콨ÁËÒ»¸ö±í£¬ÀïÃæÓÐÒ»¸öÁÐÊÇtimestampÀàÐÍ£¬ÎÒ±¾ÒâÊÇÔÚÊý¾Ý¸üÐÂʱ£¬Õâ¸ö×ֶεÄʱ¼äÄÜ×Ô¶¯¸üС£ÆñÖª¶ÔÕâ¸öÀàÐ͵ÄÖµ»¹²»ÉõÁ˽⣬µ¼Ö³ö´í¡£·¢ÏÖÕâ¸ö×Ö¶ÎÖ»ÊÇÔÚÕâÐÐÊý¾Ý½¨Á¢µÄʱºòÓÐÖµ£¬ÔÚ¸üеÄÈ´Îޱ仯¡£
    ²éÕÒ×ÊÁÏ£¬·¢ÏÖÊÇÎÒ½¨±íµÄÓï¾äÓÐÎÊÌ⣺
ÒÔÏÂÊÇ´ú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ