[Lazarus] Postgres database again...

Graeme Geldenhuys graemeg.lists at gmail.com
Tue May 27 14:14:44 CEST 2008


Michael Van Canneyt wrote:
>> Cons:
>>   * Yes it's longer than an Integer type and uses more space, but with 
>> today's hard drive sizes that is totally irrelevant.
> 
> The size on disk is not relevant, but the size in memory is. Speed is an
> issue, and the smaller the data is, the more can be kept in memory, and the
> faster the engine can traverse it when doing queries.
> 
> It's the very reason why I don't use GUIDs as primary keys.
> 
> If you have a busy server, 8 CPU's, lots of memory, but 500 simultaneous
> connections, such seemingly unimportant details all of a sudden do become 
> important.

Memory is cheap too!  :)

The pros still outweigh the cons.

* Guaranteed uniqueness, so we can easily merged different franchisees 
databases into one master database for statistics generation.
* No extra round trips to the DB Server (which could be over a slow 
connection on a remote site)
* DB Server independent
* Really easy to implement and guaranteed to work.
   - MS SQL Server's @@identify prone to errors
   - Firebird/Interface triggers don't return identity value like
     Postgress
   - Batch ID retrieval (say 20 at a time) in combination with
     Amblers High/Low algorithm waists numbers. But saves on DB round
     trips.
etc...


Regards,
   - Graeme -


_______________________________________________________
fpGUI - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/





More information about the Lazarus mailing list