Friday, April 27, 2012

However are Numbers and Characters Stored in Oracle

1. For integers others than those in tens (i.e. 10, 100...), 1-99 is stored using 2 bytes, 101~999 using 3 bytes...
2. For integers in tens, their trailing 0s are not used any extra bytes. E.g. 100000000 still uses 2 bytes. Not sure how does Oracle achieve it?
3. For characters, each character is stored using 1 bytes.
4. So if you need to store single digit like '0' or '1' indicator, better to store it as VARCHAR2(1), not NUMBER(1).

You can use vsize to verify.

Monday, April 9, 2012

How does DataStage Project Level Auto-Purge Job Logs Work

  1. The job has to be run. I.e. if the job isn't run, its old logs will not be purged.
  2. The job has to run successfully. E.g. if the job is aborted, its old logs will not be purged.
Someone mentioned to me that the project level auto-purge job logs only affects those jobs imported after auto-purge change. This doens't appear to be the behaviour with the version 8.5 I am working with.