DB examples corrupted? and other questions

Richard Gaskin ambassador at fourthworld.com
Sat Jul 12 21:40:01 EDT 2003


David Vaughan wrote:

> Of the various DB options for OS X, it appears from a quick scan that:
> - mySQL is free, fast and not overly friendly to manage
> - PostGRE is free, not as fast but more complete an implementation than
> mySQL
> - Valentina is damned expensive for one user on one machine with no
> intention to sell, but very fast (and Tuviah advocates it for
> single-user databases)
> - SDB is free, rev-speed and a unique DB language (yes, I know there is
> nothing attractive about SQL anyway)
> - ...and of course I could just do it in Rev as my DB size, while not
> very small, does not push limits (<10,000 records, <10MB).

The 10,000-record "limit" is by no means absolute, and can be greatly
exceeded depending on how your data is stored.

In testing a slender db thang I'm making for a client, I've been able to run
queries with five evaluation criteria against 20,000 records in a hair over
4 secs on a G4/500 (and only 1.1 secs on a cheapo $500 Celeron-based HP
running XP -- don't get me started about the platform wars <g>).

The trick is to put tables in simple tab-delimited text in a variable
rather than in fields on cards.  The latter is where bulk and performance
issues come from:  the engine needs to make a text record structure for each
field on every card along with a card record structure in addition to the
data itself.  Plus, accessing data in a field is almost always much slower
than grabbing an item from a line in a block of text.

The downside to this simple text-based approach is that you have to write
your own routines for anything you need.

The upside is that you can use simple chunk expressions so it's easy to do.

If the overall size of the data is something that can be managed in RAM,
RAM-based solutions are hard to beat for speed over paged disk reads.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.2: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list