Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Êý¾Ý±í£¬Ôò¸´ÖÆÖ®ºóËùÓÐÖ÷¼ü¡¢Ë÷Òý¡¢×ÔÔöµÈ¸ñʽ½«²»¸


Ïà¹ØÎĵµ£º

mysql

mysql½Ì³Ì:¸ßÊÖÊÇÔõÑùÁ¶³ÉµÄ:¾«ÃîSQLÓï¾ä½éÉÜ
[ÈÕÆÚ£º2009-06-02] À´Ô´£º  ×÷Õߣº  
ÈçºÎ´Óһλ²ËÄñÍɱä³ÉΪ¸ßÊÖ£¬Áé»îʹÓõÄSQLÓï¾äÊDZز»¿ÉÉٵġ£±¾ÎÄÊÕ¼¯Á˲¿·Ö±È½Ï¾­µä£¬³£ÓõÄSQLÓï¾ä¹©´ó¼Ò²Î¿¼£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
¡¡¡¡ËµÃ÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb)¡¡¡¡
¡¡¡¡SQL: select * into ......

¹ØÓÚMySQLµÄ1067´íÎó½â¾ö·½·¨

 
ÄÚÈÝ£º
*************
1
°²×°£Í£Ù£Ó£Ñ£Ìºó¸ü¸ÄÁˣңϣϣԵÄÃÜÂëºóÓÃ
net startmysql
Æô¶¯Ê±ÎÒ¾ÍÓöµ½ÁËÕâÑùµÄÎÊÌ⣮ʹÓÃÒÔÏÂÃüÁîºó
c:\mysql\bin\mysqladmin-u root -p shutdown
ÔÙnet start mysql¾ÍûÓÐÕâ¸ö´íÎóÌáʾÁË!
*************
2
MySQLµÄ1067´íÎó
Q£ºÎÒµÄMysqlÅöµ½ÁË 1067 ´íÎó
´íÎóÐÅϢΪ£º
......

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ÐÞ¸ÄÃÜÂë·½·¨×ܽá

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

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

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