Re: Benchmarks of MySQL, MaxDB, PostgreSQL, and

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: CN <cnliou9(at)fastmail(dot)fm>
Cc: pgsql-benchmarks(at)postgresql(dot)org
Subject: Re: Benchmarks of MySQL, MaxDB, PostgreSQL, and
Date: 2005-03-24 11:45:09
Message-ID: Pine.LNX.4.44.0503241329520.23172-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-benchmarks

O CN έγραψε στις Mar 24, 2005 :

> Hi!
>
> A person compared the performances of MySQL, MaxDB, PostgreSQL, and
> Oracle, and posted his result at
> http://laser.dyndns.pgsqldb.com/index.php?rid=1923&S=aeac79693ab902121ccb13957fb65d8c&t=msg&th=5893&start=0&logoff=1

The posting is in chinese (simplified chinese GB2312, but still chinese!).
Also you mentioned Windows XP??
That certainly does not represent a typical situation,
at least as far as postgresql is concerned.
Anyway, i think benchmarks are strongly dependent on the
setup/tuning of each DB, and generally they dont serve
much more than marketing purposes.

However, in some (rare) cases, where care has been taken regarding
test data,tuning,cleanness of definitions,assumptions,etc,
some useful information could be mined out of benchmarks,
but again it always has to be orange against oranges and
apples against apples.

>
> I excerpted his JBuilder benchmark testing script and the results as
> follows. Peronally I am not satisfied with PostgreSQL's position in the
> result, which shows that PostgreSQL is only faster than MySQL4.1. Can
> anyone give some comments on this? Should we ignore all of them?
>
> Regards,
>
> CN
> ------------
> Tested platform: WinXP SP1
>
> public void testInsert()
> {
> java.sql.Connection conn = null;
> try {
> //MYSQL4.1
> conn = java.sql.DriverManager.getConnection(
> "[url]jdbc:mysql://localhost:3333/test[/url]");
> test("MySQL4", conn);
> //MYSQL5
> conn =
> java.sql.DriverManager.getConnection("[url]jdbc:mysql://localhost/test[/url]");
> test("MySQL5", conn);
>
> //MAXDB
> conn = java.sql.DriverManager.getConnection(
> "[url]jdbc:sapdb://LOCALHOST/TEST?unicode=true[/url]",
> "USERTEST", "USERTEST");
> test("MAXDB", conn);
>
> // postgresql
> conn = java.sql.DriverManager.getConnection(
> "[url]jdbc:postgresql://localhost:5432/testdb[/url]", "user",
> "1234");
> test("POSTGRESQL", conn);
> //ORACLE
> conn = java.sql.DriverManager.getConnection(
> "jdbc:oracle:thin:@127.0.0.1:1521:mydb", "ssdb", "ssdb");
> test("ORACLE", conn);
>
> }
> catch (Exception e) {
> e.printStackTrace();
> }
>
> }
> public void test(String db,java.sql.Connection conn) throws Exception
> {
> try
> {
> java.sql.Statement st = conn.createStatement();
> try {
> try
> {
> st.executeUpdate("drop table dm");
> }catch(Exception e)
> {
> ;
> }
> st.execute("Create Table dm(id integer,mc varchar(40))");
> }
> finally {
> st.close();
> }
>
> java.util.Date d_first = new java.util.Date();
> System.out.println("");
> System.out.print(db);
> System.out.print(" now will start :");
> System.out.println(d_first.getTime());
> conn.setAutoCommit(false);
>
> java.sql.PreparedStatement pst = conn.prepareStatement(
> "insert into dm(id,mc) values(?,?)");
> for (int i = 0; i < 10000; i++) {
> pst.setInt(1, i);
> pst.setString(2, "benchmark test");
> pst.execute();
> }
> conn.rollback();
> java.util.Date d_last = new java.util.Date();
> System.out.print(db);
> System.out.print(" now END:");
>
> System.out.println(d_last.getTime());
> System.out.print(db);
> System.out.print(" Use Time ‘G");
> System.out.println(d_last.getTime() - d_first.getTime());
>
> }finally
> {
> conn.close();
> }
> }
>
> The result follows (figures are in seconds):
>
> MySQL4 Use Time ‘G13484
> MySQL5 Use Time ‘G9703
> MAXDB Use Time ‘G10641
> POSTGRESQL Use Time ‘G11547
> ORACLE Use Time ‘G11140
>
> Replacing ROLLBACK with COMMIT in the testing script he got the
> following result:
>
> MySQL4 Use Time ‘G14031
> MySQL5 Use Time ‘G9937
> MAXDB Use Time ‘G10985
> POSTGRESQL Use Time ‘G12860
> ------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

--
-Achilleus

In response to

Browse pgsql-benchmarks by date

  From Date Subject
Next Message jeet mukherjee 2005-03-24 14:36:24 A new bie question
Previous Message CN 2005-03-24 10:35:08 Benchmarks of MySQL, MaxDB, PostgreSQL, and Oracle