Re: PostgreSQL, MySQL, etc., was Re: PostgreSQL is much

From: Shridhar Daithankar <shridhar_daithankar(at)myrealbox(dot)com>
To: Chris Travers <chris(at)travelamericas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL, MySQL, etc., was Re: PostgreSQL is much
Date: 2003-11-27 09:18:06
Message-ID: 3FC5C14E.8020005@myrealbox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general

Chris Travers wrote:
> HEAP tables are MySQL tables which reside in memory and are visible across
> sessions. For obvious reasons, this violates the D in ACID.

Postgresql depend upon two level of buffers. One is it's own buffers and others
are OS buffer cache. So when you say update the table, the relevant portion is
fetched in postgresql buffers and updated. OS does the physical fetch for
postgresql and keeps a copy in it's own buffer cache.

Even if postgresql does not keep them in it's own buffers after a certain time,
most probably OS buffer cache will. So effectively it is cached in RAM. However
other IO operations might need memory and it might get reused under load.

Postgresql does not have a special name for it. It goes for every operation it
makes. So if your table is small enough, it is already cached in the RAM by all
chances.

There should be no performance difference between small tables in postgresql and
heap tables in mysql.

> In many cases this can be very usefull-- for example if I am building a
> system where I want the simplicity of a SQL-like interface with the low
> latency of memory-only devices. WOuld I have to run the entire db in a
> ramdisk, or can anyone think of a way to do something like this?

No. Just build a normal table in postgresql. That's it. And the bright side of
it, it satisfy D.

Hope this helps. I would be interested in numbers that say postgresql is slower
than mysql heap tables. (You can force postgresql to load entire table by doin
select * from table. Of course the table is expected to be small enough.. Then
compare the results. It will always be slow first time..)

Shridhar

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Tony 2003-11-27 09:19:56 PostgreSQL Advocacy, Thoughts and Comments
Previous Message Chris Travers 2003-11-27 08:08:14 Re: PostgreSQL, MySQL, etc., was Re: PostgreSQL is much faster than MySQL, only when...

Browse pgsql-general by date

  From Date Subject
Next Message Tony 2003-11-27 09:19:56 PostgreSQL Advocacy, Thoughts and Comments
Previous Message Jean-Michel POURE 2003-11-27 08:58:44 Re: Open source data modeling tools for PostgreSQL