sleepycat db VS MySQL or postgres

Ivan Voras ivoras at freebsd.org
Tue Jul 2 10:45:59 UTC 2013


On 01/07/2013 22:28, Jim Pazarena wrote:
> I have a rather extensive series of databases created and in use all
> with the very old sleepycat db3. I believe in the addage "don't fix
> what ain't broken", but in the case of db3, it IS broken and my db
> files get corrupted on occasion.
> 
> I could move to db5 or db6 OR MySQL, or even postgres.
> 
> I use simple primary key files, most entries are added from a CLI
> or termcap/curses screen. Some programatically. With about the same
> number of sequential dumps vs indexed random reads.
> 
> I have no experience with the c interface for postgres or mysql, but
> also, do not know how much the c interface has changed for sleepycat
> 5/6 compared to the c interface for db3, which I understand quite well.
> So I am prepared for a learning curve irrespective of which platform
> I select. Records do not exceed much more than 10-20,000, with key sizes
> not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various
> smaller key sizes.
> 
> Suggestions would be very much appreciated.

Well, this is essentially a bikeshed thread... so why not chip in :)

I'd say it depends on what is your priority or what do you want to
achieve by switching databases.

If you want it to be as easy as possible, switch to DB5 and you'll be ok.

If you want to learn something interesting, try one of the recent NoSQL
databases, such as Redis, MongoDB or CouchDB - they're like DBx but with
significantly more powerful query capabilities.

If you want to get a feel of how SQL databases work, go with PostgreSQL,
but be aware that to really use a SQL database the way they're made to
be used, you'll need to properly design a relational schema. Using them
to store 20 KiB blobs indexed by a single key is way too simplistic and
probably much slower than what you could get with a simple DBx engine.
Also, SQL databases usually work with SQL queries, which are text, so
you'll have a non-trivial task of fitting C structs in their text/blob
field types - it's best to avoid it. Also, you'll need to learn how to
tune and maintain proper database servers.

If you want to just try SQL but without bothering with tuning and
maintainance, try SQLite, but beware it is basically limited to a single
writer (and inifinite reader) clients in the best case (with WAL
journalling).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20130702/16db1f18/attachment.sig>


More information about the freebsd-questions mailing list