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

MySQLÖÐInnoDBºÍMyISAMµÄ²î±ð

InnoDBºÍMyISAMÊÇÔÚʹÓÃMySQL×î³£ÓõÄÁ½¸ö±íÀàÐÍ£¬¸÷ÓÐÓÅȱµã£¬ÊÓ¾ßÌåÓ¦Óöø¶¨¡£ÏÂÃæÊÇÒÑÖªµÄÁ½ÕßÖ®¼äµÄ²î±ð£¬½ö¹©²Î¿¼¡£
innodb 
      InnoDB ¸ø MySQL ÌṩÁ˾ßÓÐÊÂÎñ(commit)¡¢»Ø¹ö(rollback)ºÍ±ÀÀ£ÐÞ¸´ÄÜÁ¦(crash recovery capabilities)µÄÊÂÎñ°²È«(transaction-safe (ACID compliant))ÐÍ±í¡£InnoDB ÌṩÁËÐÐËø(locking on row level)£¬ÌṩÓë Oracle ÀàÐÍÒ»ÖµIJ»¼ÓËø¶ÁÈ¡(non-locking read in SELECTs)¡£ÕâЩÌØÐÔ¾ùÌá¸ßÁ˶àÓû§²¢·¢²Ù×÷µÄÐÔÄܱíÏÖ¡£ÔÚInnoDB±íÖв»ÐèÒªÀ©´óËø¶¨(lock escalation)£¬ÒòΪ InnoDB µÄÁÐËø¶¨(row level locks)ÊÊÒ˷dz£Ð¡µÄ¿Õ¼ä¡£InnoDB ÊÇ MySQL ÉϵÚÒ»¸öÌṩÍâ¼üÔ¼Êø(FOREIGN KEY constraints)µÄ±íÒýÇæ¡£ 
      InnoDB µÄÉè¼ÆÄ¿±êÊÇ´¦Àí´óÈÝÁ¿Êý¾Ý¿âϵͳ£¬ËüµÄ CPU ÀûÓÃÂÊÊÇÆäËü»ùÓÚ´ÅÅ̵ĹØϵÊý¾Ý¿âÒýÇæËù²»Äܱȵġ£ÔÚ¼¼ÊõÉÏ£¬InnoDB ÊÇÒ»Ì×·ÅÔÚ MySQL ºǫ́µÄÍêÕûÊý¾Ý¿âϵͳ£¬InnoDB ÔÚÖ÷ÄÚ´æÖн¨Á¢ÆäרÓõĻº³å³ØÓÃÓÚ¸ßËÙ»º³åÊý¾ÝºÍË÷Òý¡£ InnoDB °ÑÊý¾ÝºÍË÷Òý´æ·ÅÔÚ±í¿Õ¼äÀ¿ÉÄÜ°üº¬¶à¸öÎļþ£¬ÕâÓëÆäËüµÄ²»Ò»Ñù£¬¾ÙÀýÀ´Ëµ£¬ÔÚ MyISAM ÖУ¬±í±»´æ·ÅÔÚµ¥¶ÀµÄÎļþÖС£InnoDB ±íµÄ´óСֻÊÜÏÞÓÚ²Ù×÷ϵͳµÄÎļþ´óС£¬Ò»°ãΪ 2 GB¡£
      ÔÚhttp://www.innodb.com/ ÉÏ¿ÉÒÔÕÒµ½ InnoDB ×îеÄÐÅÏ¢¡£InnoDB ÊÖ²áµÄ×îа汾×ÜÊDZ»·ÅÖÃÔÚÄÇÀ²¢ÇÒÔÚÄÇÀï¿ÉÒԵõ½ InnoDB µÄÉÌÒµÐí¿É(order commercial licenses)ÒÔ¼°Ö§³Ö¡£ 
      InnoDB ÏÖÔÚ(2001ÄêÊ®ÔÂ)ÔÚһЩ´óµÄÐè¸ßÐÔÄܵÄÊý¾Ý¿âÕ¾µãÉϱ»Ê¹Óá£ÖøÃûµÄ Internet ÐÂÎÅÕ¾µã Slashdot.org ¾ÍÊÇʹÓõÄInnoDB¡£ Mytrix, Inc. ÔÚ InnoDB ±íÉÏ´æ´¢Á˳¬¹ý1TB µÄÊý¾Ý£¬¶øÇÒÁíÍâµÄÒ»¸öÕ¾µãÔÚ InnoDB ±íÉÏ´¦Àí×Åƽ¾ùÿÃë 800 ´ÎµÄ²åÈë/¸üеĸºÔØ¡£
MyISAM
      MyISAM ÊÇMySQLȱʡ´æÖüÒýÇæ¡£
      ÿÕÅMyISAM ×À±»´æ·ÅÔÚÅÌÔÚÈý¸öÎļþ ¡£frm Îļþ´æ·Å±í¸ñ¶¨Òå¡£ Êý¾ÝÎļþÊÇMYD (MYData) ¡£ Ë÷ÒýÎļþÊÇMYI (MYIndex) ÒýÉì¡£
     
ÒÔÏÂÊÇÁ½ÕßһЩϸ½ÚºÍ¾ßÌåʵÏֵIJî±ð£º
      1.InnoDB²»Ö§³ÖFULLTEXTÀàÐ͵ÄË÷Òý¡£ 
      2.InnoDB Öв»±£´æ±íµÄ¾ßÌåÐÐÊý£¬Ò²¾ÍÊÇ˵£¬Ö´ÐÐselect


Ïà¹ØÎĵµ£º

MySQL¿É¿¿ÐÔ·½°¸·ÖÎöÓë±È½Ï

ÒýÓÃhttp://bbs.yahunet.com/thread-9946-1-1.html
´Ó»ù±¾Çé¿ö¡¢³É±¾¡¢ÓÅȱµãºÍÓ¦Óó¡ºÏµÈ·½Ãæ¶Ô5ÖÖMySQLµÄ¿É¿¿ÐÔ·½°¸
½øÐÐÁË·ÖÎö
ºÍ±È½Ï£¬¶ÔMySQLµÄ¿ª·¢ºÍ¹ÜÀí
ÓÐÒ»¶¨µÄ½è¼ø×÷Óá£
1£®MySQL Clustering(ndb-cluster stogare)
¼ò½é£º
MySQL¹«Ë¾ÒÔ´æ´¢ÒýÇ淽ʽÌṩµÄ¸ß¿É¿¿ÐÔ·½°¸£¬ÊÇÊÂÎñ°²È«µÄ£¬ÊµÊ±¸´ÖÆÊý¾Ý
£¬¿ÉÓ ......

mysql»ù±¾ÃüÁî

 Æô¶¯£ºnet start mySql;
  ½øÈ룺mysql -u root -p/mysql -h localhost -u root -p databaseName;
  ÁгöÊý¾Ý¿â£ºshow databases;
  Ñ¡ÔñÊý¾Ý¿â£ºuse databaseName;
  Áгö±í¸ñ£ºshow tables£»
  ÏÔʾ±í¸ñÁеÄÊôÐÔ£ºshow columns from tableName£»
  ½¨Á¢Êý¾Ý¿â£ºsource fileNam ......

mysql date

ÈÕÆÚº¯Êý£º
http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html
http://hi.baidu.com/yase_guoguo/blog/item/171c2d4feea83c01b2de0527.html
SQL ʱ¼ä±È½Ï
select * from useroperation where '2009-10-26 00:00:00' < date;  //dateµÄÀàÐÍÊÇdatetime
select * from useroperation where D ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ