Subject | "Blobs in space" question. |
---|---|
Author | Jason Chapman (JAC2) |
Post date | 2002-01-23T10:00:59Z |
Sorry, couldn't resist the "pigs in space".....
All,
Common perception is that a Blob is stored in its own page period.
Well, I thought some time ago Paul Beach dropped in that they can either be:
1) In the data page where the record resides
2) In a page of Blobs
3) One Blob per page
I stored this in my brain somewhere as a possible item I would like to
investigate, but carried on preaching that Blobs were stored in their own
page.
I just reviewed http://www.ibphoenix.com/ibp_blobs.html and looked at the
storage mechanism there. Good doc BTW.
Well, in tidying my desk and brain dumping as I am leaving my current
company, I was asked about this again as they developers were not sure the
4096 per blob was stacking up.
I did a test and I am sure that for the following:
create table blobtest
(str Varchar(10),
b_lob blob)
that the blob was actually stored in the same page as the record data, I
checked this with a hexeditor.
I got as far as adding 3 records with small Blobs and all three records were
completely stored in the same page.
So to my Q, is the above assesment correct (1 - 3), if so, how does IB/FB
decide. Finally I think in the future I may want to force it to use (2)
rather than (1), but that is for devel group I guess.
Thanks
JAC
p.s. still haven't got an environment together to look at the source - still
scared of C!
All,
Common perception is that a Blob is stored in its own page period.
Well, I thought some time ago Paul Beach dropped in that they can either be:
1) In the data page where the record resides
2) In a page of Blobs
3) One Blob per page
I stored this in my brain somewhere as a possible item I would like to
investigate, but carried on preaching that Blobs were stored in their own
page.
I just reviewed http://www.ibphoenix.com/ibp_blobs.html and looked at the
storage mechanism there. Good doc BTW.
Well, in tidying my desk and brain dumping as I am leaving my current
company, I was asked about this again as they developers were not sure the
4096 per blob was stacking up.
I did a test and I am sure that for the following:
create table blobtest
(str Varchar(10),
b_lob blob)
that the blob was actually stored in the same page as the record data, I
checked this with a hexeditor.
I got as far as adding 3 records with small Blobs and all three records were
completely stored in the same page.
So to my Q, is the above assesment correct (1 - 3), if so, how does IB/FB
decide. Finally I think in the future I may want to force it to use (2)
rather than (1), but that is for devel group I guess.
Thanks
JAC
p.s. still haven't got an environment together to look at the source - still
scared of C!