Re: PostgreSQl or BerkeleyDB ?? - Mailing list pgsql-general

From Jeff Davis
Subject Re: PostgreSQl or BerkeleyDB ??
Date
Msg-id 200203020138.RAA09660@mail.ucsd.edu
Whole thread Raw
In response to PostgreSQl or BerkeleyDB ??  (a_asvin@mailcity.com (Asvin Ananthanarayan))
List pgsql-general
As usual with these types of questions, I would say that the answer is: "It
depends".

Remember that query parsing becomes negligible, as does startup time, when
you're trying to run a query on a large dataset that is expected to take a
significant amount of time.

Note: I didn't do a lot of research to provide these answers (i.e. I could be
completely wrong).

I don't think that BerkeleyDB provides the MVCC (multi-version concurrency
control) system that postgres does, so I think that postgres might perform
better under high concurrency.

Furthermore, to accomplish similar performance to postgresql in a BerkeleyDB
app for some tasks you may need to make your BerkeleyDB app a part of a
larger system. Postgres provides caching, memory management (over all
connections, not just one app), data statistics, the use of statistics to
intellegntly plan a search for data, etc, which are not included in
BerkeleyDB and are a requirement for many applications.

So, although the BerkeleyDB library is very high quality (I mean not to
disparage it in any way; it's a great product that I use), it's purpose is
clearly different. In order to provide all of the services that postgresql
provides, more will need to be built upon the library. MySQL provides some of
these abilities using the berkeley db, and it's faster for some applications.
PostgreSQL is faster for others.

I am fairly sure, however, that if you have a large, complex system and
you're not making use of caching of indexes and relations accross processes
and if your application searches for data along the same path every time (no
matter the search criteria), PostgreSQL will win out on performance.

As for "comperative studies" you might examine some comparisons of MySQL vs
PostgreSQL when MySQL uses the BerkeleyDB, since that would put the databases
into a more similar category. Make sure the study examines recent versions of
all software involved; there's no use getting old data.

Regards,
    Jeff

On Tuesday 26 February 2002 01:26 pm, Asvin Ananthanarayan wrote:
> Are there any comparative studies between the performance of
> PostgreSQL and BerkeleyDB ? I would assume BerkeleyDB to be a bit
> faster atleast because it does not to SQL parsing ( it has C API's to
> access data).
> Thanks
> Asvin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

pgsql-general by date:

Previous
From: missive@frontiernet.net (Lee Harr)
Date:
Subject: Re: Newbie question re SQL
Next
From: "Thomas T. Thai"
Date:
Subject: UPDATE with value from another table