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 ¾¹È»ÓÐÁ½¸öÊýÁ ......
Ò»¡¢INSERTºÍREPLACE
INSERTºÍREPLACEÓï¾äµÄ¹¦Äܶ¼ÊÇÏò±íÖвåÈëеÄÊý¾Ý¡£ÕâÁ½ÌõÓï¾äµÄÓï·¨ÀàËÆ¡£ËüÃǵÄÖ÷ÒªÇø±ðÊÇÈçºÎ´¦ÀíÖظ´µÄÊý¾Ý¡£
1. INSERTµÄÒ»°ãÓ÷¨
MySQLÖеÄINSERTÓï¾äºÍ±ê×¼µÄINSERT²»Ì«Ò»Ñù£¬ÔÚ±ê×¼µÄSQLÓï¾äÖУ¬Ò»´Î²åÈëÒ»Ìõ¼Ç¼µÄINSERTÓï¾äÖ»ÓÐÒ»ÖÖÐÎʽ¡£
INSERT INTO tablename(ÁÐÃû…) ......
Mysql Öж¨Òå×ֶκóµÄÊý¾ÝµÄÓô¦£º
int(1)ºÍint(10)ËƺõûÓÐʲô²î±ð£¬¶¼±íʾ×î´óËĸö×Ö½ÚµÄÕûÐÍÊý¾Ý¡£
ÀýÈ綨ÒåÒ»¸öÃû×ÖΪtestµÄ±í:
DROP TABLE IF EXISTS `test`;
CREATE TABLE `test` (
`id` int(1) NOT NULL,
`ids` int(10) default NULL,
`c` char(1) default NULL,
`cs` ......
Ò»¡¢°²×°ÏµÍ³»·¾³
1¡¢ÏµÍ³£ºcentos5
2¡¢²âÊÔÔÚvm5.5
×¼±¸Èí¼þ
lighttpd-1.4.18
ÏÂÔصØÖ·
mysql-5.0.41
part1ÏÂÔصØÖ·
part2ÏÂÔصØÖ·
part3ÏÂÔصØÖ·
php-5.2.3
ÏÂÔصØÖ·
SupeSite/X-Space
part1ÏÂÔصØÖ·
part2ÏÂÔصØÖ·
part3ÏÂÔصØÖ·
discuz
ÏÂÔصØÖ·
¶þ¡¢´î½¨web·þÎñÆ÷°²×°¹ý³Ì
1¡¢mysql5°²×°
$ tar zx ......
1. ʹÓÃGRANTÓï¾äÌí¼Ó£ºÊ×ÏÈÔÚÊý¾Ý¿â±¾»úÉÏÓÃROOTÓû§
µÇ¼MySql£¨ÎÒÊÇÓÃÔ¶³Ì¿ØÖÆlinux·þÎñÆ÷£¬Ï൱ÓÚÔÚ·þÎñÆ÷±¾»úµÇ¼MySqlÁË£©£¬È»ºóÊäÈ룺
mysql>GRANT ALL PRIVILEGES ON *.* TO admin@localhost IDENTIFIED BY 'something' WITH GRANT OPTION;
Ìí¼ÓÒ»¸öÓû§admin²¢ÊÚȨͨ¹ý±¾µØ»ú£¨localhost)·ÃÎÊ£¬ÃÜÂë“s ......