dz̸MysQLÖÐHANDLERÓï·¨½éÉܼ°Ê¹ÓÃ
½ñÌìС±àÒªºÍ´ó¼Ò˵µÄÊÇhandlerµÄÓ÷¨£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
HANDLER tbl_name OPEN [ AS alias ]
HANDLER tbl_name READ index_name { = | >= | <= | < } (value1,value2,...)
[ WHERE where_condition ] [LIMIT ... ]
HANDLER tbl_name READ index_name { FIRST | NEXT | PREV | LAST }
[ WHERE where_condition ] [LIMIT ... ]
HANDLER tbl_name READ { FIRST | NEXT }
[ WHERE where_condition ] [LIMIT ... ]
HANDLER tbl_name CLOSE
HANDLERÓï¾äÌṩͨÍù±í´æ´¢ÒýÇæ½Ó¿ÚµÄÖ±½ÓͨµÀ¡£HANDLER¿ÉÒÔÓÃÓÚMyISAMºÍInnoDB±í¡£
HANDLER...OPENÓï¾äÓÃÓÚ´ò¿ªÒ»¸ö±í£¬Í¨¹ýºóÐøµÄHANDLER...READÓï¾ä½¨Á¢¶ÁÈ¡±íµÄͨµÀ¡£±¾±íÄ¿±ê²»»á±»ÆäËüÏ̹߳²Ïí£¬Ò²²»»á¹Ø±Õ£¬Ö±µ½Ï̵߳÷ÓÃHANDLER...CLOSE»òÏß³ÌÖÐֹʱΪֹ¡£Èç¹ûÄúʹÓÃÒ»¸ö±ðÃû´ò¿ª±í£¬ÔòʹÓÃÆäËüHANDLERÓï¾ä½øÒ»²½²ÎÔıíÊDZØÐëʹÓô˱ðÃû£¬¶ø²»ÄÜʹÓñíÃû¡£
Èç¹û±»Ö¸¶¨µÄË÷ÒýÂú×ã¸ø¶¨µÄÖµ²¢ÇÒ·ûºÏÁËWHEREÌõ¼þ£¬ÔòµÚÒ»¸öHANDLER...READÓ﷨ȡ³öÒ»ÐС£Èç¹ûÄúÓÐÒ»¸ö¶àÁÐË÷Òý£¬ÔòÖ¸¶¨Ë÷ÒýÁÐֵΪһ¸öÓöººÅ¸ô¿ªµÄÇåµ¥¡£¼È¿ÉÒÔΪË÷ÒýÖеÄËùÓÐÁÐÖ¸¶¨Öµ£¬Ò²¿ÉÒÔΪË÷ÒýÁеÄ×î×ó±ßµÄǰ׺ָ¶¨Öµ¡£¼ÙÉèÒ»¸öË÷Òý°üÀ¨Èý¸öÁУ¬Ãû³ÆΪcol_a, col_b,ºÍcol_c£¬²¢°´´Ë˳ÐòÅÅÁС£HANDLERÓï¾ä¿ÉÒÔΪË÷ÒýÖеÄËùÓÐÈý¸öÁÐÖ¸¶¨Öµ£¬»òÕßΪһ¸ö×î×ó±ßǰ׺Öеĸ÷ÁÐÖ¸¶¨Öµ¡£¾ÙÀý˵Ã÷£º
HANDLER ... index_name = (col_a_val,col_b_val,col_c_val) ...
HANDLER ... index_name = (col_a_val,col_b_val) ...
HANDLER ... index_name = (col_a_val) ...
µÚ¶þ¸öHANDLER...READÓï·¨°´Ë÷ÒýµÄ˳Ðò´Ó±íÖÐÈ¡³öÒ»ÐС£Ë÷ÒýµÄ˳Ðò·ûºÏWHEREÌõ¼þ¡£
µÚÈý¸öHANDLER...READÓï·¨°´×ÔÈ»ÐеÄ˳Ðò´Ó±íÖÐÈ¡³öÒ»ÐС£×ÔÈ»ÐеÄ˳Ðò·ûºÏWHEREÌõ¼þ¡£µ±ÏëÒª¶ÔÕû¸ö±í½øÐÐɨÃèʱ£¬´ËÓï¾ä±ÈHANDLER tbl_name READ index_name¸ü¿ì¡£×ÔÈ»ÐеÄ˳ÐòÖ¸µÄÊÇÐд洢ÔÚMyISAM±íÊý¾ÝÎļþµÄ˳Ðò¡£±¾Óï¾äÒ²ÊÊÓÃÓÚInnoDB±í£¬µ«ÊÇÒòΪûÓжÀÁ¢µÄÊý¾ÝÎļþ£¬ËùÒÔûÓÐÕâÀà¸ÅÄî¡£
²»Ê¹ÓÃLIMIT×Ó¾äʱ£¬ËùÓÐÐÎʽµÄHANDLER...READÓï¾ä¾ùֻȡ³öÒ»ÐС£ Èç¹ûÒª·µ»Ø¶à¸öÐУ¬Ó¦¼ÓÈëÒ»¸öLIMIT×Ӿ䡣±¾Óï¾äÓÚSELECTÓï¾äµÄÓï·¨Ò»Ñù¡£
HANDLER...CLOSEÓÃÓڹرÕʹÓÃHANDLER...OPEN´ò¿ªµÄ±í¡£
×¢ÊÍ£ºÒªÊ¹ÓÃHANDLER½Ó¿ÚÀ´²éÔÄÒ»¸ö±íµÄPRIMARY KEY£¬Ó¦Ê¹ÓôøÒýºÅµÄʶ±ð·û`PRIMARY`£º
HANDLER tbl_name READ `PRIM
Ïà¹ØÎĵµ£º
¹Ø¼ü×Ö: mysql6 mysql6ÏÂÔØ
×÷ΪһÃû¿ª·¢ÈËÔ±,ÎÒ¶ÔÂÌɫСÈí¼þÇéÓжÀÖÓ,ÒòΪÓÃÆðÀ´·½±ã¿ì½ÝÂï,±ãÓÚЯ´ø,Ò×ÓÚÔÚÑÝʾϵͳÖÐʹÓÃ,¿ª·¢Ê±¿ÉÁ¢¼´½øÈë״̬. £¨ÔÚ¸½¼þÖУ©
ÒÔÏÂÊÇÏêϸ˵Ã÷:
MySQL 6 ÂÌÉ«¾«¼ò°æ(BAT°æ±¾)
MySQL 6 Ö§³ÖÍâ¼ü,ÊÓͼ´æ´¢¹ý³Ì,ÊÂÎñµÈ¹¦ÄÜ(ÂÌÉ«¾« ......
ÓÉÓÚ×î½üÒ»Ö±ÔÚÁ˽âmysql¡£¸÷ÖÖ±íÀàÐ͵ÄÊý¾Ý´æ´¢ÒÔ¼°Ïà¹ØÏÞÖƾÍÊDZØÐëÁ˽âµÄ·½ÃæÁË¡£
×Ô¼ºµÄ·þÎñÆ÷»·¾³£ºOS Cent OS ext3£¬memory 4G£¬ disk 2T block size 4K¡£
¾µ÷²é£¬linuxÏÂÎļþ×î´óÊÇ´æÔÚÏÞÖƵġ£È¥googleÉÏËÑÁËËÑ£¬´ó¼Ò˵·¨²»Ò»£¬×îÖÕ×Ô¼º»¹ÊÇÕÒµ½±È½Ï¹Ù·½µÄ˵¡£Ïê¼ûhttp://en.wikipedia.org/wiki/Ext3 ËùÒÔ× ......
ÍêÕûµÄʵÏÖÁËPHP½«Í¼Æ¬´æÈëMYSQL
Ç°Ì᣺
1 Ê×ÏȱØÐëÓµÓÐPHPµÄÔËÐл·¾³£¬ÁíÍ⻹µÃÓÐMYSQLÊý¾Ý¿â
2 Èç¹ûÎļþ²»ÄÜÉÏ´«³É¹¦Çë¼ì²épicsÊÇ·ñÊÇ¿ÉдµÄȨÏÞ
Ê×ÏÈÏÈ°Ñpic2db.rarÎļþ½âѹµ½PHP¿ÉÒÔÔËÐÐĿ¼Ï¡£
Æä´ÎÔÚMYSQLÖн¨Á¢Ò»¸öÊý¾Ý¿â:pic2db,È»ºóÔÚ¸ÃÊý¾Ý¿âϽ¨Á¢Ò»¸ö±í£¬±í½á¹¹Îª£º
CREATE TABLE `pi ......
Ö®ËùÒÔдÕâƪ²©¿Í£¬ÊÇÒòΪǰ¼¸Ìì²ÅÅöµ½ÁËÕâôһ¸öÎÊÌ⣬ÒÔÇ°»¹²»ÖªµÀmysqlÓÐÕâôһ¸öÎÊÌâ¡£
ÎÒÃǵÄϵͳʹÓÃÁËstruts+hibernate£¬Êý¾Ý¿âʹÓõÄÊÇmysql£¬×Ö·û¼¯Í³Ò»Îªutf-8¡£
±¾À´ÒѾÍê³ÉÁË£¬µ«ÊÇϵͳʹÓõÄʱºò£¬·¢ÏÖ²é³öÀ´µÄÈËÃûûÓÐ˳Ðò£¬±¾À´ÒÔΪºÜ¼òµ¥£¬ÔÚ²éѯµÄʱºò£¬Ö¸¶¨°´ÕÕnameÅÅÐò¾Í¿ÉÒÔÁË£¬Æñ֪ʵ¼ÊÒ»×ö²Å·¢Ï ......
Êý¾Ý¿â²Ù×÷ÀࣺDBCommon.class.php
//---------------------------------------------------------------------
// MySQL Master/SlaveÊý¾Ý¿â¶Áд²Ù×÷Àà
//
// ¿ª·¢×÷Õß: heiyeluren
// °æ±¾ÀúÊ·:
// 2006-09-20 »ù±¾µ¥Êý¾Ý¿â²Ù×÷¹¦ÄÜ, 25 ¸ö½Ó¿Ú
// 2007-07-30 Ö§³Öµ ......