Giter VIP home page Giter VIP logo

Comments (2)

liuanxin avatar liuanxin commented on August 12, 2024

$ cat /etc/issue
Debian GNU/Linux stretch/sid

$ psql --version
psql (PostgreSQL) 9.5.1
使用的 jdbc 包版本是 postgresql-9.4.1208.jre7.jar

$ mysql --version
mysql Ver 15.1 Distrib 10.0.23-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
使用的 jdbc 包版本是 mysql-connector-java-5.1.38.jar

$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

mariaDB 的结果
MyThread-3000 write end, time=101805 ms
MyThread-1000 write end, time=101949 ms
MyThread-0 write end, time=102006 ms
MyThread-3000 read end, time=191 ms
MyThread-2000 write end, time=102041 ms
MyThread-1000 read end, time=257 ms
MyThread-3000 randow read end, time=234 ms
MyThread-0 read end, time=271 ms
MyThread-2000 read end, time=272 ms
MyThread-1000 randow read end, time=161 ms
MyThread-0 randow read end, time=133 ms
MyThread-2000 randow read end, time=137 ms

threads: 4, loop: 1000, rows: 4000

write_sum=407801, avg=101950 ms
read_sum=991, avg=247 ms
randow_read_sum=665, avg=166 ms

pg 的结果
MyThread-3000 write end, time=27189 ms
MyThread-2000 write end, time=27210 ms
MyThread-0 write end, time=27225 ms
MyThread-1000 write end, time=27236 ms
MyThread-2000 read end, time=349 ms
MyThread-3000 read end, time=390 ms
MyThread-0 read end, time=417 ms
MyThread-1000 read end, time=431 ms
MyThread-2000 randow read end, time=301 ms
MyThread-3000 randow read end, time=309 ms
MyThread-0 randow read end, time=331 ms
MyThread-1000 randow read end, time=311 ms

threads: 4, loop: 1000, rows: 4000

write_sum=108860, avg=27215 ms
read_sum=1587, avg=396 ms
randow_read_sum=1252, avg=313 ms

mariaDB 真心慢!!!

from my-blog.

codefollower avatar codefollower commented on August 12, 2024

@liuanxin
我昨天后来测了MariaDB10.1,修改一下data\my.ini,加入innodb_flush_log_at_trx_commit=2重新测就很快了。默认也是像MySQL一样,innodb_flush_log_at_trx_commit的值是1,每次insert一条新记录就会调fsync,所以会很慢。

from my-blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.