pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: mlw <markw@mohawksoft.com>
To: Jean-Michel POURE <jm.poure@freesurf.fr>
Cc: pgsql-hackers@postgresql.org, Mike Rogers <temp6453@hotmail.com>
Subject: Re: Ultimate DB Server
Date: Sun, 28 Oct 2001 17:19:28 -0500
Message-ID: <3BDC8470.DE644E72@mohawksoft.com> (raw)
References: <4.2.0.58.20011028140833.00d13490@pop.freesurf.fr>
	<4.2.0.58.20011028121057.00d1a100@pop.freesurf.fr>
	<4.2.0.58.20011028085953.00cfa740@pop.freesurf.fr>
	<4.2.0.58.20011028085953.00cfa740@pop.freesurf.fr>
	<4.2.0.58.20011028121057.00d1a100@pop.freesurf.fr>
	<4.2.0.58.20011028140833.00d13490@pop.freesurf.fr>
	<4.2.0.58.20011028163302.00cdc890@pop.freesurf.fr>
	<4.2.0.58.20011028194736.00a23670@pop.freesurf.fr>

> Hardware can bring a 2x gain whereas software optimization can boost an
> application by 10x. Until now, I never heard or read about a real *software
> optimization* benchmark between MySQL and PostgreSQL.

It has been my experience that a knowledgeable, SQL savvy engineer can not use
MySQL. You have to have no basic knowledge of SQL to be able to work within its
limitations. Every project with which I have tried MySQL, I have always found
myself trying to work around what I can't do with it. In that respect, it is
like working on Windows.

> I see at least two easy cases where PostgreSQL beats MySQL:
> 1) Create a simple relational DB with triggers storing values instead of
> performing LEFT JOINS. Increase the number of simultaneous queries. MySQL
> will die at x queries and PostgreSQL will still be working at 5x queries.
> 2) Use PL/pgSQL to perform complex jobs normally devoted to an application
> server (Java, PHP) on a separate platform. In some case (recursive loops
> for example), network traffic can be divided by 100. As a result,
> PostgreSQL can be 10x faster because everything is performed server-side.

Server side programming is a double edged sword. PostgreSQL is not a
distributed database, thus you are limited to the throughput of a single
system. Moving processing off to PHP or Java on a different system can reduce
the load on your server by distributing processing to other systems. If you can
cut query execution time by moving work off to other systems, you can
effectively increase the capacity of your database server.

Typically, on a heavily used database, you should try to limit server side
programming to that which reduces the database work load. If you are moving
work, which can be done on the client, back to the server, you will bottleneck
at the server while the client is sitting idle.

> 
> This is to say that, in some circomstances, PostgreSQL running on an i586
> with IDE drive beats MySQL on a double Pentium. In real life, applications
> are always optimized at software level first before hardware level. This is
> why PostsgreSQL is *by nature* better than MySQL.

One of the reasons why PostgreSQL beats MySQL, IMHO, is that it has the SQL
features that allow you to control and reduce the database work load by doing
things smarter.

> 
> Unless MySQL gets better, there is no real challenge in comparing both systems.

It is funny, I know guys that love MySQL. Even when I show them the cool things
they can do with Postgres, they just don't seem to get it. It is sort of like
talking to an Amiga user.



view thread (16+ messages)  latest in thread

Message-ID: <3BDC8470.DE644E72@mohawksoft.com>
Permalink:  ../3BDC8470.DE644E72@mohawksoft.com/
Also on:    postgresql.org/message-id/3BDC8470.DE644E72@mohawksoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: markw@mohawksoft.com, jm.poure@freesurf.fr, temp6453@hotmail.com
  Subject: Re: Ultimate DB Server
  In-Reply-To: <3BDC8470.DE644E72@mohawksoft.com>
  References: <4.2.0.58.20011028140833.00d13490@pop.freesurf.fr> <4.2.0.58.20011028121057.00d1a100@pop.freesurf.fr> <4.2.0.58.20011028085953.00cfa740@pop.freesurf.fr> <4.2.0.58.20011028163302.00cdc890@pop.freesurf.fr> <4.2.0.58.20011028194736.00a23670@pop.freesurf.fr> <3BDC8470.DE644E72@mohawksoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox