From owner-freebsd-questions@FreeBSD.ORG Tue Jul 2 10:45:59 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EA3C3781 for ; Tue, 2 Jul 2013 10:45:58 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id AA5A91398 for ; Tue, 2 Jul 2013 10:45:58 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Uty5t-0007Bm-3j for freebsd-questions@freebsd.org; Tue, 02 Jul 2013 12:45:57 +0200 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jul 2013 12:45:57 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jul 2013 12:45:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Ivan Voras Subject: Re: sleepycat db VS MySQL or postgres Date: Tue, 02 Jul 2013 12:45:47 +0200 Lines: 73 Message-ID: References: <51D1E68B.5050508@paz.bz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2AFFDKEIKJMLFBMODOWVX" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130322 Thunderbird/17.0.4 In-Reply-To: <51D1E68B.5050508@paz.bz> X-Enigmail-Version: 1.5.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jul 2013 10:45:59 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2AFFDKEIKJMLFBMODOWVX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > I could move to db5 or db6 OR MySQL, or even postgres. >=20 > 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. >=20 > 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 size= s > not much wider than 16 bytes (ipv4), 13 (mac), 32 (ipv6). And various > smaller key sizes. >=20 > 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). ------enig2AFFDKEIKJMLFBMODOWVX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlHSr1sACgkQ/QjVBj3/HSwsTQCffsuimzCXwDxArntkbARSj4AL 0ZUAoJzcquvxiLkPIFRjD3jcn7+adf5j =6VJU -----END PGP SIGNATURE----- ------enig2AFFDKEIKJMLFBMODOWVX--