MySQL Forums
Forum List  »  NDB clusters

Disk Storage and BLOB issue
Posted by: Adam McDonald
Date: January 03, 2007 06:12PM

MySQL Version 5.1.14-beta (latest)

Undo files and tablespace commands:
CREATE LOGFILE GROUP lg_1
ADD UNDOFILE 'undo_1.dat'
INITIAL_SIZE 16M
UNDO_BUFFER_SIZE 2M
ENGINE NDB;

ALTER LOGFILE GROUP lg_1
ADD UNDOFILE 'undo_2.dat'
INITIAL_SIZE 12M
ENGINE NDB;

CREATE TABLESPACE ts_1
ADD DATAFILE 'data_1.dat'
USE LOGFILE GROUP lg_1
INITIAL_SIZE 50G
ENGINE NDB;

ALTER TABLESPACE ts_1
ADD DATAFILE 'data_2.dat'
INITIAL_SIZE 50G
ENGINE NDB;

Table creation command:
CREATE TABLE `<dbname>`.`FileDataStorage` (
`fileid` int(11) NOT NULL AUTO_INCREMENT,
`clientid` int(11) DEFAULT NULL,
`articleid` int(11) DEFAULT NULL,
`type` varchar(8) DEFAULT NULL,
`data` longblob,
`size` int(11) NOT NULL,
`created` datetime DEFAULT NULL,
PRIMARY KEY (`fileid`),
KEY `filedatastorage_idx0` (`clientid`),
KEY `filedatastorage_idx1` (`articleid`),
INDEX(type, size, created)
)
TABLESPACE ts_1 STORAGE DISK
ENGINE=NDBCLUSTER DEFAULT CHARSET=latin1;

----------------------------------

Checking the table using ndb_desc:
$ ndb_desc -c localhost FileDataStorage -d <dbname> -p
-- FileDataStorage --
Version: 2
Fragment type: 5
K Value: 6
Min load factor: 78
Max load factor: 80
Temporary table: no
Number of attributes: 7
Number of primary keys: 1
Length of frm data: 420
Row Checksum: 1
Row GCI: 1
TableStatus: Retrieved
-- Attributes --
fileid Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
clientid Int NULL AT=FIXED ST=MEMORY
articleid Int NULL AT=FIXED ST=MEMORY
type Varchar(8;latin1_swedish_ci) NULL AT=SHORT_VAR ST=MEMORY
data Blob(256,8000;4) NULL AT=FIXED ST=MEMORY
size Int NOT NULL AT=FIXED ST=MEMORY
created Datetime NULL AT=FIXED ST=MEMORY

-- Indexes --
PRIMARY KEY(fileid) - UniqueHashIndex
PRIMARY(fileid) - OrderedIndex
type(type, size, created) - OrderedIndex
filedatastorage_idx0(clientid) - OrderedIndex
filedatastorage_idx1(articleid) - OrderedIndex

------------------------------------------------

So I am curious why the data BLOB column isn't being stored on disk??? I pretty much followed the Reference Manual word-for-word when setting up the disk based storage and it doesn't appear that the data BLOB is an index. Is there a special way you have to handle blobs since I know the data is actually stored in another table with the ndbcluster. Is there something I am missing? Thanks in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
Disk Storage and BLOB issue
1486
January 03, 2007 06:12PM
914
January 04, 2007 04:18PM


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.