Subject RE: [firebird-support] RTRIM Overhead
Author Helen Borrie
At 07:16 AM 16/10/2007, Leyne, Sean wrote:
> > I upped the size in the RTRIM definition to 32,767 from 255. Are
> > you suggesting that this would effect performance?
>
>First, did you change the UDF source to handle the size change? (This
>would mean compiling a new UDF)

No it wouldn't mean recompiling. You can redeclare a string UDF as
many times as you like using different-sized arguments. (Not so with
internal functions...) But 32767 is too long: the limit for varchar is 32765.

>Second, it is very likely that the change in size did affect
>performance.
>
>What is the size of the largest non-blob/memo field in your source file?
>
>Do you really need a definition which allows for 32Kb for RTRIM?

If there are only one or two input fields that need such a large
container, make some more declarations, e.g., RTRIM30, etc., so that
you reduce the number of huge padded strings being pushed around in memory.

What was the problem with the autocast in the initial run, that
caused you to resort to trimming?

You said it was a large input file (as it must be, to take so long) -
how frequently are you committing during the run? are there indexes
in the destination file?

./heLen