Elakkiya wrote:TIP # 4
Do you know using an odd number of digits for PACKED DECIMAL (COMP-3) is 5% to 20% faster than using an even number of digits !!
This tip seems more to be a bullshit.
Both odd-, and even-number of digits Packed decimals:
1) use the same space in memory,
2) use the same machine instructions for ANY calculation
The only difference is, even-number digits is stored in the same field in memory, but one extra decimal 0-digits is added in the unused half-byte.
There is absolutely no reason to make any performance difference.
Furthermore,
performance difference related to CPU operations, if any, can affect
0.0000000001% to 0.1% of overall performance issues, caused mainly by senseless algorithmic approach, and/or by wrong organization or required I/O operations.