Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
For the first time I have just autonumbered one of my key fields (previously a composite key) as I am looking at reducing some of my storage spaces.
On 8m rows this reduced my file size by a whopping 90mb. (370 to 280).
This is obviously my major fact table, but I do have other key fields which have a large number of rows.
I've read Rob's blog and searched on here, but I am just wondering what happens if I autonumber some more key fields, will these cause a clash as they start on 1 again, or will the autonumber continue throughout the script?
This was one bad key, normally my key field is 'XXX' &rowno() where XXX = some alpha characters, so they should be relatively efficient anyway
load with this script and look for data and keys.
key_a_l1:
load *,AutoNumber(F1,'a') as key1;
LOAD * INLINE [
F1
A
B
];
key_a_l2:
load *,AutoNumber(F2,'a') as key2;
LOAD * INLINE [
F2
B
];
key_b:
load *,AutoNumber(F3,'b') as key3;
LOAD * INLINE [
F3
B
];
key_noname_l1:
load *,AutoNumber(F4) as key4;
LOAD * INLINE [
F4
A
B
C
];
key_noname_l2:
load *,AutoNumber(F5) as key5;
LOAD * INLINE [
F5
C
B
];
load with this script and look for data and keys.
key_a_l1:
load *,AutoNumber(F1,'a') as key1;
LOAD * INLINE [
F1
A
B
];
key_a_l2:
load *,AutoNumber(F2,'a') as key2;
LOAD * INLINE [
F2
B
];
key_b:
load *,AutoNumber(F3,'b') as key3;
LOAD * INLINE [
F3
B
];
key_noname_l1:
load *,AutoNumber(F4) as key4;
LOAD * INLINE [
F4
A
B
C
];
key_noname_l2:
load *,AutoNumber(F5) as key5;
LOAD * INLINE [
F5
C
B
];