From: | "Fred Ingham" <ingham(at)erols(dot)com> |
---|---|
To: | "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: PostgreSQL and mySQL database size question |
Date: | 2001-04-27 18:10:01 |
Message-ID: | PNEJKLGAKBJECOKMAOPHCEDFCPAA.ingham@erols.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
OK, but that only accounts for 3.2MB of the extra 49.6MB used by PostgreSQL.
-----Original Message-----
From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
Sent: Friday, April 27, 2001 2:05 PM
To: ingham(at)erols(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] PostgreSQL and mySQL database size question
FAQ item 4.7 discusses table size computations. My guess is that it is
the 36 bytes-per-row that is the problem. Those bytes record the
visibility of the row for proper transactions semantics and MVCC.
> Bruce,
>
> I have your book right in front of me... do you have that information in
the
> book? If not, I will take a look at the FAQ. As for mySQL, here are the
> storage requirements:
>
> Storage requirements for numeric types
>
> Column type Storage required
> TINYINT 1 byte
> SMALLINT 2 bytes
> MEDIUMINT 3 bytes
> INT 4 bytes
> INTEGER 4 bytes
> BIGINT 8 bytes
> FLOAT(X) 4 if X <= 24 or 8 if 25 <= X <= 53
> FLOAT 4 bytes
> DOUBLE 8 bytes
> DOUBLE PRECISION 8 bytes
> REAL 8 bytes
> DECIMAL(M,D) M+2 bytes if D > 0, M+1 bytes if D = 0 (D+2, if M < D)
> NUMERIC(M,D) M+2 bytes if D > 0, M+1 bytes if D = 0 (D+2, if M < D)
>
> Storage requirements for date and time types
>
> Column type Storage required
> DATE 3 bytes
> DATETIME 8 bytes
> TIMESTAMP 4 bytes
> TIME 3 bytes
> YEAR 1 byte
>
> Storage requirements for string types
>
> Column type Storage required
>
> CHAR(M) M bytes, 1 <= M <= 255
> VARCHAR(M) L+1 bytes, where L <= M and 1 <= M <= 255
> TINYBLOB,
> TINYTEXT L+1 bytes, where L < 2^8
> BLOB, TEXT L+2 bytes, where L < 2^16
> MEDIUMBLOB,
> MEDIUMTEXT L+3 bytes, where L < 2^24
> LONGBLOB,
> LONGTEXT L+4 bytes, where L < 2^32
> ENUM('value1','value2',...) 1 or 2 bytes, depending on the number of
> enumeration values (65535 values maximum)
> SET('value1','value2',...) 1, 2, 3, 4 or 8 bytes, depending on the number
of
> set members (64 members maximum)
>
> Fred
>
> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> Sent: Friday, April 27, 2001 1:48 PM
> To: ingham(at)erols(dot)com
> Cc: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] PostgreSQL and mySQL database size question
>
>
> Did you see the FAQ items on estimating database sizes? Does MySQL have
> less overhead per row?
>
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | webb sprague | 2001-04-27 18:16:22 | WAL Log using all my disk space! |
Previous Message | Bruce Momjian | 2001-04-27 18:04:30 | Re: PostgreSQL and mySQL database size question |