cht電腦資訊SQL DB
adm Find login register

MySQL vs PostgreSQL Benchmarks

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
1subject: MySQL vs PostgreSQL BenchmarksPromote 0 Bookmark 02010-09-01quote  

這邊有一個 MySQL 5.1.30 vs PostgreSQL 8.3.7 的 benchmark,看起來是 PostgreSQL 的 速度 performance 比較好。 MySQL 的使用者比較多多。使用者多不代表一定比較好。不過 benchmark 的速度不一定是你的真正使用情況的速度。

部分結果 

SQL Operation
MySQL 5.0.51
seconds
MySQL 5.1.30 with InnoDB 1.0.3
seconds
PostgreSQL
seconds
create_tables() 0.03 0.06 0.02
load() 277.7 253 208.45
create_idx_uniques_key_bt() 1756.51 112.25 29.46
create_idx_updates_key_bt() 1758.63 119.33 41.14
create_idx_hundred_key_bt() 1681.67 117.65 37.51
create_idx_tenpct_key_bt() 76.22 118.33 30.42
edited: 1
eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
2subject: Promote 0 Bookmark 02010-09-01quote  

根據 phoronix 的測試,PostgreSQL 在 EXT4 速度最快。不過好像與 EXT4 buffer (delayed write, writeback) 有關,只是如果斷電,資料遺失 or 資料庫毀損的比例不知道高不高。Btrfs好慘。

 


 

Running our PostgreSQL test yielded another win for the EXT4 file-system while XFS and EXT3 were close for the second place spot. Btrfs, however, is severely hampered in this test where it was just allowing for 69 transactions per second.

edited: 4
ychao
joined: 2007-10-25
posted: 298
promoted: 21
bookmarked: 3
3subject: Promote 0 Bookmark 02010-09-02quote  

很奇怪,PostgreSQL比起MySQL功能多得多,而且支援SQL語法也比較完整。可是實際上「感覺」的市占率似乎遠低於MySQL。這真的是相當奇怪的情況。

小弟我自己在考慮選用SQL資料庫的時候,雖然說這兩個都很早就知道,安裝難易度也差不多(都是RPM下去就對了),一般軟體(PHP/ODBC... )的支援也都沒有差別。也還是第一個會選MySQL,這是因為一直有個迷思,以為MySQL比較簡單,所以應該比較輕快。沒想到這個測試結果完全把它打破了。

看來在「女巫」買下「太陽」之後,又多了個理由選用PostgreSQL了。

eliu

joined: 2007-08-09
posted: 11468
promoted: 617
bookmarked: 187
新竹, 台灣
4subject: Promote 0 Bookmark 02010-09-02quote  

後來又看一次上面的 benchmark,在 single user test,MySQL好像比較快。

Postgresql 一般在 multi-user 時比較快。資料庫很多情況是 multi-user 。

edited: 1

cht電腦資訊SQL DB
adm Find login register
views:13922