RE: PostgreSQL and mySQL database size question
От | Fred Ingham |
---|---|
Тема | RE: PostgreSQL and mySQL database size question |
Дата | |
Msg-id | PNEJKLGAKBJECOKMAOPHMEDECPAA.ingham@erols.com обсуждение исходный текст |
Ответ на | PostgreSQL and mySQL database size question ("Fred Ingham" <ingham@erols.com>) |
Ответы |
Re: PostgreSQL and mySQL database size question
|
Список | pgsql-general |
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@candle.pha.pa.us] Sent: Friday, April 27, 2001 1:48 PM To: ingham@erols.com Cc: pgsql-general@postgresql.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?
В списке pgsql-general по дате отправления: