Mysql±àÒë°²×°²ÎÊýÓÅ»¯
1. -static 13%
--with-client-ldflags=-all-static
--with-mysqld-ldflags=-all-static
¾²Ì¬Á´½ÓÌá¸ß13%ÐÔÄÜ
2. -pgcc 1%
CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc \
CXXFLAGS="-O3 -mpentiumpro -mstack-align-double \
-felide-constructors -fno-exceptions -fno-rtti"
Èç¹ûÊÇInter´¦ÀíÆ÷£¬Ê¹ÓÃpgccÌá¸ß1%ÐÔÄÜ
3. Unix Socket 7.5%
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
ʹÓÃunixÌ×½Ó×ÖÁ´½ÓÌá¸ß7.5%ÐÔÄÜ£¬ËùÒÔÔÚwindowsÏÂmysqlÐÔÄܿ϶¨²»ÈçunixÏÂÃæ
4. --enable-assembler
ÔÊÐíʹÓûã±àģʽ(ÓÅ»¯ÐÔÄÜ)
ÏÂÃæÊÇ×ÜÌåµÄ±àÒëÎļþ
±àÒë´úÂë
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
-fno-exceptions -fno-rtti -fomit-frame-pointer -ffixed-ebp"
./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
--with-client-ldflags=-all-static
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
--with-charset=utf8
--with-collation=utf8_general_ci
--with-extra-charsets=all
Ïà¹ØÎĵµ£º
select id from message where author_id in (select followed_id from Relation where follower_id=1) order by id desc ºÍ ·Ö±ðÖ´ÐÐ $userlist = select followed_id from Relation where follower_id=1 ÔÙ select id from message where author_id in ($userlist) order by id desc ¾¹È»ÓÐÁ½¸öÊýÁ ......
°æȨÉùÃ÷£º¿ÉÒÔÈÎÒâתÔØ£¬×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷
http://www.5ilinux.com/lamp01.html
¹Ø¼ü×Ö£ºapache+mysql+php apache mysql php ÅäÖà lamp ·þÎñÆ÷ web
Linux+Apache+Mysql+PHPµäÐÍÅäÖÃ
µ÷ÊÔ»·¾³£ºRedhat9.0 Apache1.3.29 Mysql3.23.58 PHP4.3.4
LinuxϵͳµÄ°²×°ÎҾͲ»½²Á ......
2009Äê10ÔÂ30ÈÕ ÐÇÆÚÎå 22:53
1, ²é¿´MySQL
·þÎñÆ÷ÅäÖÃÐÅÏ¢
mysql> show variables;
mysql> show variables;
2, ²é¿´MySQL·þÎñÆ÷ÔËÐеĸ÷ÖÖ״ֵ̬
mysql> show global status;
mysql> show global status;
3, Âý²éѯ
mysql> show variables like '%slow%';
+--------------- ......
×î½üÒ»Ö±ÔÚ½øÐÐPenroseÁ¬½ÓMysqlµÄ³¢ÊÔ£¬¿É×ÜÊÇÌáʾÎÞ·¨Á¬½Óµ½Mysql£¬ÎÞÂÛÊǼì²é¶Ë¿ÚÊÇ·ñ¿ªÆô£¬ÉèÖÃMysqlÔ¶³Ì·ÃÎÊȨÏ޵ȶ¼²»¹ÜÓ㬺óÀ´ÔÚPenroseµÄ¹ÙÍøÕÒµ½Ò»¸ö½¨Á¢ÑùÀýÊý¾Ý¿â¼°ÉèÖÃÔ¶³ÌÁ¬½ÓµÄÎĵµ£¬Ã»Ïëµ½Ò»¾Ù³É¹¦£¬Í´¿ì°¡£¡
ÏÂÃæ¾Í°ÑÎĵµºÍ´ó¼Ò¹²Ïíһϣ¡£¨ÊÇÓ¢ÎÄ£¬´ó¼Ò¾Í´ÕºÏ×Å¿´Ï°ɣ¡ÒòΪ×î½ü¸ãPenroseÌ«ÀÛÁË£¬ ......
¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str) ·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> 50
mysql> select ASCII(2);
-> 50
mysql> select ASCII('dx');
-> 100
Ò² ......