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

mysqlÖ®ÄÚ´æ±í

 ÈçºÎ´´½¨ÄÚ´æ±í
£¿
    ´´½¨ÄÚ´æ±í·Ç³£µÄ¼òµ¥£¬Ö»Ðè×¢Ã÷ ENGINE=
MEMORY ¼´¿É:
    CREATE TABLE  `tablename` ( `columnName` varchar(256) NOT NUL)
ENGINE=MEMORY DEFAULT CHARSET=utf8 MAX_ROWS=100000000;
×¢Òâ
£º
   
µ±ÄÚ´æ±íÖеÄÊý¾Ý´óÓÚmax_heap_table_sizeÉ趨µÄÈÝÁ¿´óСʱ£¬mysql»áת»»³¬³öµÄÊý¾Ý´æ´¢µ½´ÅÅÌÉÏ£¬Òò´ËÕâÊÇÐÔÄܾʹó´òÕÛ¿ÛÁË£¬Ëù
ÒÔÎÒÃÇ»¹ÐèÒª¸ù¾ÝÎÒÃǵÄʵ¼ÊÇé¿öµ÷Õûmax_heap_table_size£¬ÀýÈçÔÚ.cnfÎļþÖÐ[mysqld]µÄÏÂÃæ¼ÓÈ룺
       
max_heap_table_size = 2048M
   
ÁíÍâÔÚ½¨±íÓï¾äÖл¹¿ÉÒÔͨ¹ýMAX_ROWSÀ´¿ØÖƱíµÄ¼Ç¼Êý¡£
ÄÚ´æ±íʹÓùþϣɢÁÐË÷Òý°ÑÊý¾Ý±£´æÔÚÄÚ´æÖУ¬Òò´Ë¾ßÓм«¿ìµÄËٶȣ¬Êʺϻº´æÖÐСÐÍÊý¾Ý¿â£¬µ«ÊÇʹÓÃÉÏÊܵ½Ò»Ð©ÏÞÖÆ£¬ÒÔÏÂÊÇÀ¶²ÝʹÓõÄһЩ¸ÐÊÜ¡£
1¡¢heap¶ÔËùÓÐÓû§µÄÁ¬½ÓÊǿɼûµÄ£¬ÕâʹµÃËü·Ç³£ÊʺÏ×ö»º´æ¡£
2¡¢×¢ÒâÊÂÏî¡£
heap²»ÔÊÐíʹÓÃxxxTEXTºÍxxxBLOBÊý¾ÝÀàÐÍ£»Ö»ÔÊÐíʹÓÃ=ºÍ<=>²Ù×÷·ûÀ´ËÑË÷¼Ç¼£¨²»ÔÊÐí<¡¢>¡¢<=»ò>=£©£»²»Ö§³Öauto_increment£»Ö»ÔÊÐí¶Ô·Ç¿ÕÊý¾ÝÁнøÐÐË÷Òý£¨not
null£©¡£
×¢£º²Ù×÷·û “<=>” ˵Ã÷£ºNULL-safe
equal.Õâ¸ö²Ù×÷·ûºÍ“=”²Ù×÷·ûÖ´ÐÐÏàͬµÄ±È½Ï²Ù×÷£¬²»¹ýÔÚÁ½¸ö²Ù×÷Âë¾ùΪNULLʱ£¬ÆäËùµÃֵΪ1¶ø²»ÎªNULL£¬¶øµ±Ò»¸ö²Ù×÷ÂëΪNULLʱ£¬ÆäËùµÃֵΪ0¶ø²»ÎªNULL¡£
3¡¢·þÎñÆ÷ÖØÆô£¬ËùÓÐheap±íÊý¾Ý¶ªÊ§
£¬µ«ÊÇheap±í½á¹¹ÈÔÈ»´æÔÚ£¬ÒòΪheap±í½á¹¹ÊÇ´æ·ÅÔÚʵ¼ÊÊý¾Ý¿â·¾¶Ïµģ¬²»»á×Ô¶¯É¾³ý¡£ÖØÆôÖ®ºó£¬heap½«±»Çå¿Õ£¬Õâʱºò¶ÔheapµÄ²éѯ½á¹û¶¼Êǿյġ£
¶ÔÓÚÖØÆôÔì³ÉµÄÊý¾Ý¶ªÊ§£¬ÓÐÒÔϵĽâ¾ö°ì·¨
£º
¡¡a¡¢ÔÚÈκβéѯ֮ǰ£¬Ö´ÐÐÒ»´Î¼òµ¥µÄ²éѯ£¬ÅжÏheap±íÊÇ·ñ´æÔÚÊý¾Ý£¬Èç¹û²»´æÔÚ£¬Ôò°ÑÊý¾ÝÖØÐÂдÈ룬»òÕßDROP±íÖØи´ÖÆijÕÅ±í¡£ÕâÐèÒª¶à×öÒ»´Î²éѯ¡£²»¹ý¿ÉÒÔд³ÉincludeÎļþ£¬ÔÚÐèÒªÓøÃheap±íµÄÒ³ÃæËæʱµ÷Ó㬱ȽϷ½±ã¡£
¡¡b¡¢¶ÔÓÚÐèÒª¸Ãheap±íµÄÒ³Ã棬ÔÚ¸ÃÒ³ÃæµÚÒ»´ÎÇÒ½öÔÚµÚÒ»´Î²éѯ¸Ã±íʱ£¬¶ÔÊý¾Ý¼¯½á¹û½øÐÐÅжϣ¬Èç¹û½á¹ûΪ¿Õ£¬ÔòÐèÒªÖØÐÂдÈëÊý¾Ý¡£ÕâÑù¿ÉÒÔ½ÚÊ¡Ò»´Î²éѯ¡£
¡¡c¡¢¸üºÃµÄ°ì·¨ÊÇÔÚmysqlÿ´ÎÖØÐÂÆô¶¯Ê±×Ô¶¯Ð´ÈëÊý¾Ýµ½heap£¬µ«ÊÇÐèÒªÅäÖ÷þÎñÆ÷£¬¹ý³Ì±È½Ï¸´ÔÓ£¬Í¨ÓÃÐÔÊܵ½ÏÞÖÆ¡£
4¡¢Èç¹ûheapÊǸ´ÖƵÄijÊý¾Ý±í£¬Ôò¸´ÖÆÖ®ºóËùÓÐÖ÷¼ü¡¢Ë÷Òý¡¢×ÔÔöµÈ¸ñʽ½«²»¸


Ïà¹ØÎĵµ£º

solarisÏÂmysqlÊý¾Ý¿â×Ö·û¼¯

solarisÏÂmysql°²×°Íê±ÏºóÖ´ÐÐÈçϲÙ×÷£¬¿ÉÒÔÐÞ¸ÄÊý¾Ý¿â×Ö·û¼¯£¬ÉèÖÃMySQLÔÚSolarisÉϱíÃû²»Çø·Ö´óСд
1.¿½±´ÎļþÈçÏ£º
cp /usr/sfw/share/mysql/my-medium.cnf /etc/my.cnf
°ÑÎļþÖ»¶ÁÊôÐÔÈ¥µô
chmod +w my.cnf
 
2 ÉèÖÃmysqlµÄ×Ö·û¼¯£ºÔÚ/etc/my.cnfÖеÄmysqld¶ÎºÍclient¶Î¼ÓÈë´úÂ룺
 
[client]
de ......

MySQLÐÞ¸ÄÃÜÂë·½·¨×ܽá

Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸ÄMySQLÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ģ¬ ËùÒÔÒ»°ãÓû§ÎÞ·¨¸ü¸ÄÃÜÂ룬³ý·ÇÇëÇó¹ÜÀíÔ±¡£ ·½·¨Ò»Ê¹ÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµÄuser±í£¬ ²»¹ý±ðÍüÁËʹÓÃPASSWORDº¯Êý¡£ ·½·¨¶þʹÓÃmysqladmin£¬ÕâÊÇÇ°ÃæÉùÃ÷µÄÒ»¸öÌØÀý¡£ mysqladmin -u root -p password mypasswd ÊäÈëÕâ¸ö ......

mysql ÖÐshow ÃüÁîÓ÷¨Ïêϸ½éÉÜ

 ÒÔÏÂËùÓÐÃüÁÊÇÔÚ½øÈëmysql¼à¿ØÆ÷ÖÐÖ´Ðеģº
  a. show tables»òshow tables from database_name; // ÏÔʾµ±Ç°Êý¾Ý¿âÖÐËùÓбíµÄÃû³Æ
  b. show databases; // ÏÔʾmysqlÖÐËùÓÐÊý¾Ý¿âµÄÃû³Æ
  c. show columns from table_name from database_name; »òshow columns from databa ......

Ê×ÓÃMYSQLË÷ÒýµÄ¿ì¸Ð

ÓÃÁËMYSQLÒ»Äê¶à£¬ÇÒÒ»Ö±±»MYSQLµÄ¿ìËÙ²éѯËùÎüÒý£¬¿É½ñÌìÔõôÅöʯͷÁË£¿
1Dp4V*W+t0
3p)o{3s.a'^Qr0
Ô­À´¾ÍÊÇË÷ÒýÔÚ×ö¹Ö¡£ÓÉÓÚ±¾ÈËÊÇÒµÓà°®ºÃ×ÔѧPHP+MYSQL¿ª·¢£¬ËùÒÔÔÚÀíÂÛÓÅ»¯·½ÃæÒ»°ã¿¼ÂÇÉõÉÙ£¬»ù±¾²»ÓÃ×Ö¶ÎË÷ÒýÈ¥×öMYSQLÓÅ»¯£¬¿ÉÄÜÒ²ÊÇÎÒ²»»áÓðɡ££¨×Ü¿´ÊéÉÏ˵Ë÷ÒýµÄºÃ´¦ºÃ´¦µÄ£¬½ñÌì×Åʵ³¢µ½ÌðÍ·ÁË¡££©PHPChi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ