mysql – 姚知福的博客 http://blog.yzf888.com 有高质量的产品才有高质量的生活 Thu, 18 Mar 2010 03:58:26 +0000 zh-CN hourly 1 https://wordpress.org/?v=6.5.5 如何优化内存512M服务器的MYSQL设置 http://blog.yzf888.com/%e5%a6%82%e4%bd%95%e4%bc%98%e5%8c%96%e5%86%85%e5%ad%98512m%e6%9c%8d%e5%8a%a1%e5%99%a8%e7%9a%84mysql%e8%ae%be%e7%bd%ae/ Thu, 18 Mar 2010 03:58:26 +0000 http://blog.yzf888.com/?p=306 # 512M 设置: 加到my.ini的[mysqld]下
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M

innodb_buffer_pool_size = 256M
innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

]]>
从mysql迁移到postgreSQL注意点 http://blog.yzf888.com/%e4%bb%8emysql%e8%bf%81%e7%a7%bb%e5%88%b0postgresql%e6%b3%a8%e6%84%8f%e7%82%b9/ Sat, 13 Mar 2010 15:45:15 +0000 http://blog.yzf888.com/?p=260 1auto_increment 转换成SERIAL

2concat 转换成 ||

3date_format 转换成 to_char

4ifnull 转换成 coalesce($1, $2)

5PostgreSQL HAVING 子句不能使用别名。

select name, count(*) as score

from mytable

group by name

having score > 10

转换成

select name, count(*) as score

from mytable

group by name

having count(*) > 10

]]>
如何改变已有数据的MYSQL数据表的字符集 http://blog.yzf888.com/%e5%a6%82%e4%bd%95%e6%94%b9%e5%8f%98%e5%b7%b2%e6%9c%89%e6%95%b0%e6%8d%ae%e7%9a%84mysql%e6%95%b0%e6%8d%ae%e8%a1%a8%e7%9a%84%e5%ad%97%e7%ac%a6%e9%9b%86/ Fri, 15 Jan 2010 07:25:23 +0000 http://blog.yzf888.com/?p=177 想把office库的字符集从cp850改成latin1。MYSQL手册上说使用 alter table xx convert to character set latin1。试了下不行。忙了半天,发现按以下步骤可以:

  1. mysqldump –character-sets-dir=..\share\charsets –default-character-set=cp850 office -r office.sql;
  2. 用notepad++打开office.sql,替换所有cp850为latin1;
  3. mysql office < office.sql。

  应该是我的MYSQL缺省字符集问题。

]]>
酒店管理系统数据库比较 http://blog.yzf888.com/%e9%85%92%e5%ba%97%e7%ae%a1%e7%90%86%e7%b3%bb%e7%bb%9f%e6%95%b0%e6%8d%ae%e5%ba%93%e6%af%94%e8%be%83/ Mon, 11 Jan 2010 05:55:11 +0000 http://blog.yzf888.com/?p=7 酒店管理系统数据库比较

现代酒店管理系统都采用数据库软件,以下是常用数据库的比较:

品牌 平台 性能 价格 性价比
oracle Win Linux Unix 5 5 1
sybase Win Linux Unix 4 4 1
sqlserver Win 3 4 0.75
foxbase Win 1 2 0.5
mysql Win Linux Unix 4 0.1 40
Postgres Win Linux Unix 5 0.1 50

资深软件是最早在中国酒店2000+酒店管理系统软件里采用mysql数据库的酒店管理系统软件厂商,在2007年推出的国际版中更采用了Postgres数据库。为广大酒店管理系统用户进一步节省了费用。

]]>