I need UDF which would parse one clob column MESSAGE + extract some data to fill some other columns in the same table.
I will use 'generate as' feature for corresponding columns, where UDF to be called.

For instance, the simplest case is the column, that just needs first 8 letters of MESSAGE.
To test java UDF, i've used analog of LEFT(MESSAGE, 8) - which works fine - MESSAGE.getSubString(1, 8) and this java class also works, but VER-R-R-RY SLOWLY!
Handling 4800 records took about 5minutes!!! It's intolerable.

How may I increase its performance??

P.S. DB2 version is