Re: How to do faster DML - Mailing list pgsql-general

From veem v
Subject Re: How to do faster DML
Date
Msg-id CAB+=1TV1+1=6mXQhi=m7f_2XDXek=+xf8RBeAWv-Vhr4J8k2SQ@mail.gmail.com
Whole thread Raw
In response to Re: How to do faster DML  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Responses Re: How to do faster DML  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general
Thank You so much for the detailed explanation.

On Sun, 11 Feb 2024 at 05:55, Peter J. Holzer <hjp-pgsql@hjp.at> wrote:

Yes. Numbers in Oracle are variable length, so most Oracle tables
wouldn't contain many fixed length columns. In PostgreSQL must numeric
types are fixed length, so you'll have quite a lot of them.


So it means , say in other databases like (oracle database), we were careless choosing the data length , say for example Varchar2(4000), if the real data which is inserted into the table holds a varchar string of length 20 bytes then Oracle trimmed it to occupy the 20 bytes length only in the storage. but in postgre here we need to be cautious and define the length as what the data attribute can max contains , because that amount of fixed space is allocated to every value which is inserted into the table for that attribute/data element. Similarly for Number/Numeric data type.  Please correct if my understanding is wrong.

Regards
Veem

pgsql-general by date:

Previous
From: Michał Kłeczek
Date:
Subject: Re: How should we design our tables and indexes
Next
From: Karsten Hilbert
Date:
Subject: Re: How should we design our tables and indexes