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

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

°³½ñÌìÕâô¼¤¶¯ÓÖÏëдÎÄÕµÄÔ­ÒòÊÇMySQL5.1µÄ·¢²¼´øÀ´ÁËÉè¼Æ³¬Ç¿¶¯Á¦Êý¾Ý¿âµÄÇ¿ÓÐÁ¦µÄÎäÆ÷£¬ÈκÎMySQLµÄDBA¶¼Ó¦¸Ã¾¡¿ìѧϰ²¢Ê¹ÓÃËü¡£°³¾õµÃÈç¹ûÄܺܺõÎʹÓÃÕâ¸ö5.1°æ´øÀ´µÄÐÂÌØÐÔ£¬DBA¿ÉÒÔʹ×Ô¼º¹ÜÀíµÄVLDB£¨²»ÖªµÀʲôÊÇVLDB£¿¸æËßÄ㣬ÊǺôóºÃ´óµÄÊý¾Ý¿âµÄÒâ˼£¬Very Large DB£©»òÊý¾Ý²Ö¿âÆæ¼£°ãµÄ»ñµÃ¾Þ´óµÄÐÔÄÜÌáÉý¡£
ʲôÊÇÊý¾Ý¿â·ÖÇø£¿
Êý¾Ý¿â·ÖÇøÊÇÒ»ÖÖÎïÀíÊý¾Ý¿âÉè¼Æ¼¼Êõ£¬DBAºÍÊý¾Ý¿â½¨Ä£ÈËÔ±¶ÔÆäÏ൱ÊìϤ¡£ËäÈ»·ÖÇø¼¼Êõ¿ÉÒÔʵÏֺܶàЧ¹û£¬µ«ÆäÖ÷ҪĿµÄÊÇΪÁËÔÚÌض¨µÄSQL²Ù×÷ÖмõÉÙÊý¾Ý¶ÁдµÄ×ÜÁ¿ÒÔËõ¼õÏìӦʱ¼ä¡£
·ÖÇøÖ÷ÒªÓÐÁ½ÖÖÐÎʽ£º//ÕâÀïÒ»¶¨Òª×¢ÒâÐкÍÁеĸÅÄrowÊÇÐУ¬columnÊÇÁУ©
ˮƽ·ÖÇø£¨Horizontal Partitioning£© ÕâÖÖÐÎʽ·ÖÇøÊǶԱíµÄÐнøÐзÖÇø£¬Í¨¹ýÕâÑùµÄ·½Ê½²»Í¬·Ö×éÀïÃæµÄÎïÀíÁзָîµÄÊý¾Ý¼¯µÃÒÔ×éºÏ£¬´Ó¶ø½øÐиöÌå·Ö¸î£¨µ¥·ÖÇø£©»ò¼¯Ìå·Ö¸î£¨1¸ö»ò¶à¸ö·ÖÇø£©¡£ËùÓÐÔÚ±íÖж¨ÒåµÄÁÐÔÚÿ¸öÊý¾Ý¼¯Öж¼ÄÜÕÒµ½£¬ËùÒÔ±íµÄÌØÐÔÒÀÈ»µÃÒÔ±£³Ö¡£
¾Ù¸ö¼òµ¥Àý×Ó£ºÒ»¸ö°üº¬Ê®Ä귢Ʊ¼Ç¼µÄ±í¿ÉÒÔ±»·ÖÇøΪʮ¸ö²»Í¬µÄ·ÖÇø£¬Ã¿¸ö·ÖÇø°üº¬µÄÊÇÆäÖÐÒ»ÄêµÄ¼Ç¼¡££¨ÅóÞÈ×¢£ºÕâÀï¾ßÌåʹÓõķÖÇø·½Ê½ÎÒÃǺóÃæÔÙ˵£¬¿ÉÒÔÏÈ˵һµã£¬Ò»¶¨ÒªÍ¨¹ýij¸öÊôÐÔÁÐÀ´·Ö¸î£¬Æ©ÈçÕâÀïʹÓõÄÁоÍÊÇÄê·Ý£©
´¹Ö±·ÖÇø£¨Vertical Partitioning£© ÕâÖÖ·ÖÇø·½Ê½Ò»°ãÀ´ËµÊÇͨ¹ý¶Ô±íµÄ´¹Ö±»®·ÖÀ´¼õÉÙÄ¿±ê±íµÄ¿í¶È£¬Ê¹Ä³Ð©Ìض¨µÄÁб»»®·Öµ½Ìض¨µÄ·ÖÇø£¬Ã¿¸ö·ÖÇø¶¼°üº¬ÁËÆäÖеÄÁÐËù¶ÔÓ¦µÄÐС£
¾Ù¸ö¼òµ¥Àý×Ó£ºÒ»¸ö°üº¬ÁË´ótextºÍBLOBÁÐµÄ±í£¬ÕâЩtextºÍBLOBÁÐÓÖ²»¾­³£±»·ÃÎÊ£¬Õâʱºò¾ÍÒª°ÑÕâЩ²»¾­³£Ê¹ÓõÄtextºÍBLOBÁË»®·Öµ½ÁíÒ»¸ö·ÖÇø£¬ÔÚ±£Ö¤ËüÃÇÊý¾ÝÏà¹ØÐÔµÄͬʱ»¹ÄÜÌá¸ß·ÃÎÊËٶȡ£
ÔÚÊý¾Ý¿â¹©Ó¦ÉÌ¿ªÊ¼ÔÚËûÃǵÄÊý¾Ý¿âÒýÇæÖн¨Á¢·ÖÇø£¨Ö÷ÒªÊÇˮƽ·ÖÇø£©Ê±£¬DBAºÍ½¨Ä£Õß±ØÐëÉè¼ÆºÃ±íµÄÎïÀí·ÖÇø½á¹¹£¬²»Òª±£´æÈßÓàµÄÊý¾Ý£¨²»Í¬±íÖÐͬʱ¶¼°üº¬¸¸±íÖеÄÊý¾Ý£©»òÏ໥Áª½á³ÉÒ»¸öÂß¼­¸¸¶ÔÏó£¨Í¨³£ÊÇÊÓͼ£©¡£ÕâÖÖ×ö·¨»áʹˮƽ·ÖÇøµÄ´ó²¿·Ö¹¦ÄÜʧЧ£¬ÓÐʱºòÒ²»á¶Ô´¹Ö±·ÖÇø²úÉúÓ°Ïì¡£
ÔÚMySQL 5.1ÖнøÐзÖÇø
MySQL5.1ÖÐ×¶¯ÈËÐĵÄÐÂÌØÐÔÓ¦¸Ã¾ÍÊǶÔˮƽ·ÖÇøµÄÖ§³ÖÁË¡£Õâ¶ÔMySQLµÄʹÓÃÕßÀ´ËµÈ·ÊµÊǸöºÃÏûÏ¢£¬¶øÇÒËýÒѾ­Ö§³Ö·ÖÇø´ó²¿·Öģʽ£º
Range£¨·¶Î§£© – ÕâÖÖģʽÔÊÐíDBA½«Êý¾Ý»®·Ö²»Í¬·¶Î§¡£ÀýÈçDBA¿ÉÒÔ½«Ò»¸ö±íͨ¹ýÄê·Ý»®·Ö³ÉÈý¸ö·ÖÇø£¬80Äê´ú£¨1980's£©µÄÊý¾Ý£¬90Äê´ú£¨1990's£©µÄÊý¾ÝÒÔ¼°ÈκÎÔÚ2000Ä꣨°üÀ¨2000Ä꣩ºóµÄÊý¾Ý¡£
Hash£¨¹þÏ


Ïà¹ØÎĵµ£º

MYSQL ÓëMSSQL2000 ÔÚÐ޸ıí×ֶεÄÇø±ð

Ìí¼Ó×ֶΣº
MYSQL
alter table tb add col2 varchar(10)
MSSQL2000
alter table tb add col2 varchar(10)
ÐÞ¸Ä×ֶΣº
MYSQL
 alter table tb modify col2 varchar(20)
MSSQL2000
 alter table tb alter column col2 varchar(20)
ɾ³ý×ֶΣº
MYSQL
 alter table tb drop column col ......

tomcat+mysqlÁ¬½Ó³ØµÄÅäÖÃ

ÔÚTOMCAϵÄCatalina\localhostĿ¼µÄ¹¤³Ìxml£¬±àдÈçÏ´úÂ룺
<Context path="/testProject" docBase="E:\project\TestProject\WebContent" reloadable="true"  debug="0" privileged="true">
<Resource name="jdbc/mysql" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name=" ......

MYSQLÖÐInnoDBÊÇʲô?

 
Ò»ÖÖ±íÇý¶¯,³ýÁËinnodb»¹ÓÐÆäËüµÄ,ÀýÈçisam,myisamµÈ.
innodbµÄÌØÉ«ÔÚÓÚÖ§³Ö²¢·¢Óë±í¼äÒýÓÃ
MySQLÖ§³Ö¶àÖÖ´æ´¢ÒýÇ棬Óû§¿ÉÒÔ·½±ãµÄÑ¡Óò»Í¬µÄ´æ´¢ÒýÇæÀ´Ö§³Ö×Ô¼ºµÄÓ¦Óã¬Ã¿ÖÖ²»Í¬µÄ´æ´¢ÒýÇ涼ÓÐÆä×Ô¼ºµÄÌØÐÔ
InnodbÊÇÆäÖеÄÒ»ÖÖ´æ´¢ÒýÇ棬ËüµÄÌØÐÔÊÇÖ§³ÖÊÂÎñ£¬²¢ÇÒ²ÉÓöà°æ±¾²¢·¢¿ØÖƵķ½Ê½À´Ìá¸ß²¢·¢¶È
Ö÷Òª ......

Mysql½¨±í

½¨Á¢Ò»¸öÖ÷Íâ¼ü¹Øϵ
create table t_dept(
id int(4) not null, name varchar(50) not null,
primary key(id))type=innodb;
create table t_emp (
id int(6) not null,
name char(255) not null,fk_id int(4) not null,
primary key(id),
foreign key (fk_id) references t_dept (id)) type=innodb; ......

mysqlÔ¶³ÌȨÏÞÉèÖÃ

 1¡¢½øÈëmysql£¬´´½¨Ò»¸öÐÂÓû§xuys£º
¸ñʽ£ºgrant ȨÏÞ on Êý¾Ý¿âÃû.±íÃû Óû§@µÇ¼Ö÷»ú identified by "Óû§ÃÜÂë";
grant select,update,insert,delete on *.* to xuys@192.168.88.234 identified by "xuys1234";
   ²é¿´½á¹û£¬Ö´ÐУº
   use mysql;
   select host,user,p ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ