Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

Discuz能有多快? 见识下postgreSQL的强悍,对比下mysql的低能

[复制链接]
 楼主| mark35 发表于 2012-9-30 21:32:58 | 显示全部楼层
本帖最后由 mark35 于 2012-12-3 21:02 编辑
明镜 发表于 2012-9-30 21:04
2.5的分表完善多了,感觉负载有所下降

2.5只是把字段划分出去了,并没有减少表总记录数,所以索引尺寸并未改变(即使是划分出去字段的索引)。结果是当SQL查询时无论是走索引还是走全表扫,其性能并未有任何提高。 无非是从表中fetch数据行时的IO开销减小而已。 但若需要分表中数据,那么连表开销不能不算。
所以dz把数据搞得相当冗余,authorname四处时,这也是没有法。但造成的后果就是数据一致性容易出问题
回复

使用道具 举报

明镜 发表于 2012-9-30 21:46:38 | 显示全部楼层
尼玛,你成天泡在这里想干嘛啊?!
回复

使用道具 举报

 楼主| mark35 发表于 2012-9-30 21:56:44 | 显示全部楼层
明镜 发表于 2012-9-30 21:46
尼玛,你成天泡在这里想干嘛啊?!

研究呀~
回复

使用道具 举报

让故事继续 发表于 2012-9-30 22:15:50 | 显示全部楼层
2.5比2.0慢很多 X系列中 非要选一个的话 2.0最快 最好。
7系列  7.0 7.1 7.2 不分伯仲
6系列 6.0最好
5系列5.5和5.0差不多
4系列4.1.0最经典
回复

使用道具 举报

 楼主| mark35 发表于 2012-9-30 22:17:20 | 显示全部楼层
本帖最后由 mark35 于 2012-12-3 21:02 编辑

7系列很多细节是可完善的,出个8.0都可以~
回复

使用道具 举报

 楼主| mark35 发表于 2012-9-30 22:46:13 | 显示全部楼层
本帖最后由 mark35 于 2012-12-3 21:02 编辑

mysql真t是个垃圾
写个插件,为了保证数值范围安全,想在int字段加上范围约束。DDL SQL执行没问题,但就是没约束效果。一查,原来
check是没用的,对于所有的存储引擎,CHECK子句会被分析,但是会被忽略。请参见13.1.5节,“CREATE TABLE语法”。接受这些子句但又忽略子句的原因是为了提高兼容性,以便更容易地从其它SQL服务器中导入代码,并运行应用程序,创建带参考数据的表。请参见1.8.5节,“MySQL与标准SQL的差别”。

回复

使用道具 举报

明镜 发表于 2012-9-30 22:55:46 | 显示全部楼层
让故事继续 发表于 2012-9-30 22:15
2.5比2.0慢很多 X系列中 非要选一个的话 2.0最快 最好。
7系列  7.0 7.1 7.2 不分伯仲
6系列 6.0最好

非X系列的2.0/2.2是可玩性最强的,当然从现在的眼光来看像个玩具
回复

使用道具 举报

pcyi 发表于 2012-10-3 03:23:10 | 显示全部楼层
呵呵 再来看看技术流分析数据库;给个建议不知道楼主能不能出一份PG的安装白丁教程,方便站长们做个尝试
回复

使用道具 举报

pxw2002 发表于 2012-10-6 20:27:07 | 显示全部楼层
                                
回复

使用道具 举报

 楼主| mark35 发表于 2012-10-6 21:49:12 | 显示全部楼层
pcyi 发表于 2012-10-3 03:23
呵呵 再来看看技术流分析数据库;给个建议不知道楼主能不能出一份PG的安装白丁教程,方便站长们做个尝试

Important note:
In order to use PGDG repository properly, you may need to exclude postgresql packages from the repository of the distro.
Here are the steps:
    As root, cd /etc/yum.repos.d
    Edit distro's .repo file:
        On Fedora, edit fedora.repo and fedora-updates.repo, [fedora] sections
        On CentOS, edit CentOS-Base.repo, [base] and [updates] sections.
        On Red Hat, edit edit /etc/yum/pluginconf.d/rhnplugin.conf [main] section.
    Add
    exclude=postgresql*
    to the bottom of the section.


That is enough for excluding distro packages.

CentOS6:
X64
rpm -ivh http://yum.pgrpms.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-5.noarch.rpm
i386
rpm -ivh http://yum.pgrpms.org/9.2/redhat/rhel-6-i386/pgdg-centos92-9.2-5.noarch.rpm



yum install postgresql92 postgresql92-libs postgresql92-server postgresql92-contrib postgresql92-devel postgresql92-test
yum install libevent compat-libevent14


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-2-24 11:20 , Processed in 0.031062 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表