Join / Log in
> create table lob(a clob);
> CREATE FUNCTION lobSize(CLOB) RETURNS BIGINT EXTERNAL NAME 'com.informix.judrs.LargeObjects.lobSize(java.sql.Clob)' LANGUAGE JAVA;
> create function toclob(varchar(255)) returns clob external name 'com.informix.judrs.LargeObjects.toClob(java.lang.String)' LANGUAGE JAVA;
> insert into lob values(toclob('Hello there'));
1 row(s) inserted.
> insert into lob values(toclob('lets add some rows'));
> insert into lob values(toclob('into our clob'));
> select lobsize(a) from lob;
3 row(s) retrieved.
> select sum(lobsize(a)) from lob;
1 row(s) retrieved.
Interesting. I didn't know this. Have not used sblobs much in the past, but we have just created one now recently.
In your scenario with copying an sblob column, does the engine keep track of how many references there are to each particular sblob, and only deleting the sblob when there are no more references to it?Or will it be deleted when the original row pointing to it is deleted, thus rendering the copied row useless?