[Lazarus] Postgres database again...

Damien Gerard milipili at shikami.org
Tue May 27 13:49:04 CEST 2008


Le May 27, 2008 à 1:29 PM, Michael Van Canneyt a écrit :

>
>
> 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.

Indeed. It is a bad idea.


> 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.






--
Damien Gerard
milipili at shikami.org

"Intelligence is 10 million rules."
    -- Douglas Lenat









More information about the Lazarus mailing list