Re: disk data storage and mediumtext column
Posted by:
a.noort
Date: November 29, 2006 04:43AM
Hi Stewart,
Stewart Smith Wrote:
-------------------------------------------------------
> please post SHOW CREATE TABLE for the table, also
> maybe ndb_desc output for the table
SHOW CREATE TABLE for the table:
CREATE TABLE `testtext` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`data` mediumtext,
PRIMARY KEY (`id`)
) /*!50100 TABLESPACE ts_test STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
ndb_desc for the table:
-- testtext --
Version: 2
Fragment type: 5
K Value: 6
Min load factor: 78
Max load factor: 80
Temporary table: no
Number of attributes: 2
Number of primary keys: 1
Length of frm data: 259
Row Checksum: 1
Row GCI: 1
TableStatus: Retrieved
-- Attributes --
id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
data Text(256,4000;8;latin1_swedish_ci) NULL AT=FIXED ST=MEMORY
-- Indexes --
PRIMARY KEY(id) - UniqueHashIndex
PRIMARY(id) - OrderedIndex
NDBT_ProgramExit: 0 - OK
Hmmm, this explains it: the system stores the data column in memory! If I create a similar table with a data column of type varchar, then the data column is stored on disk. See the SQL code and the output of SHOW TABLE CREATE and ndb_desc for that table below.
SHOW CREATE TABLE for the table with data column of type VARCHAR:
CREATE TABLE `test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`data` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) /*!50100 TABLESPACE ts_test STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
ndb_desc for the table with data column of type VARCHAR:
-- test --
Version: 1
Fragment type: 5
K Value: 6
Min load factor: 78
Max load factor: 80
Temporary table: no
Number of attributes: 2
Number of primary keys: 1
Length of frm data: 253
Row Checksum: 1
Row GCI: 1
TableStatus: Retrieved
-- Attributes --
id Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
data Varchar(255;latin1_swedish_ci) NOT NULL AT=FIXED ST=DISK
-- Indexes --
PRIMARY KEY(id) - UniqueHashIndex
PRIMARY(id) - OrderedIndex
NDBT_ProgramExit: 0 - OK
Subject
Views
Written By
Posted
1716
November 23, 2006 08:31AM
1111
November 23, 2006 10:29PM
1004
November 27, 2006 03:18AM
991
November 27, 2006 06:15AM
Re: disk data storage and mediumtext column
1024
November 29, 2006 04:43AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.