`

安装MYSQL

 
阅读更多

1. -static13%
--with-client-ldflags=-all-static
--with-mysqld-ldflags=-all-static
静态链接提高13%性能
2. -pgcc1%
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 Socket7.5%
--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock
使用unix套接字链接提高7.5%性能,所以在windows下mysql性能肯定不如unix下面
4. --enable-assembler
允许使用汇编模式(优化性能)

./configure --prefix=/web/mysql \ 指定安装目录
--without-debug \去除debug模式
--with-extra-charsets=gb2312 \添加gb2312中文字符支持
--enable-assembler \使用一些字符函数的汇编版本
--without-isam \去掉isam表类型支持 目前非常少用了 isam表是一种依赖平台的表
--without-innodb \去掉innodb表支持 innodb是一种支持事务处理的表,适合企业级应用
--with-pthread \强制使用pthread库(posix线程库)
--enable-thread-safe-client \以线程方式编译客户端
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \以纯静态方式编译服务端和客户端

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics