[Lazarus] Postgres database again...

Michael Van Canneyt michael at freepascal.org
Tue May 27 13:29:06 CEST 2008



On Tue, 27 May 2008, Graeme Geldenhuys wrote:

> Dave Coventry wrote:
> > Damien,
> > 
> > Thanks for the reply.
> > 
> > The situation is getting pretty urgent.
> > 
> > What I'm doing is this:
> > The user enters in preliminary information which creates a sequential
> > partial record in the database using nextval(''reg_seq'').
> > 
> > Further information is added to the record later.
> > 
> > What I need is to populate my form with the fields from the database.
> > 
> > I need to access the number of the record assigned by
> > nextval(''reg_seq''), and then I need to get the fields from the
> > record to place in edit boxes so that the user can update them....
> 
> 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.

Michael.



More information about the Lazarus mailing list