[Teneo] Unique Id generation size [message #122277] |
Mon, 12 May 2008 13:16  |
Eclipse User |
|
|
|
Hi,
Is it possible to change the automatic auto increment key generated for
Id columns to an INT from a BIGINT? Not sure how much advantage there is
to be had, but I have a few dozen tables with over 1 Million rows and
thought it might reduce the size and many have few columns in them.
Thx.
David
|
|
|
|
Re: [Teneo] Unique Id generation size [message #122323 is a reply to message #122311] |
Tue, 13 May 2008 06:18  |
Eclipse User |
|
|
|
Hi,
Thx for the reference, it appears not to be worth it. I also build very
large HashMaps for looking up these Ids for performance reasons. 8
million of them, but even then it only adds 8 bytes per lookup ( extra 4
bytes in the key and extra 4 bytes in the value ), a total of 32MB in
HashMaps that are taking 2GB of RAM is not too bad.
Thx,
David
TMartin Taal wrote:
> Hi David,
> Do you mean the synthetic id generated by Teneo? As a standard this is a
> long. I a bit reluctant to make this option driven because then there'll
> be yet another option and I am not sure that the benefit is that large.
> See here for a discussion about size differences:
> http://www.kennygorman.com/wordpress/?p=244
> when using an int versus bigint.
>
> Another way (instead of an option) I thought of is that you can override
> the IdMapper and set your own CustomIdMapper using the Teneo extension
> mechanism. This custom id mapper can then map id's the way you want.
> However, I can now see that this part is not so easy to override. If you
> want that then please enter a bugzilla for making the IdMapper easier to
> override.
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> Is it possible to change the automatic auto increment key generated
>> for Id columns to an INT from a BIGINT? Not sure how much advantage
>> there is to be had, but I have a few dozen tables with over 1 Million
>> rows and thought it might reduce the size and many have few columns in
>> them.
>>
>> Thx.
>>
>> David
>
>
|
|
|
Re: [Teneo] Unique Id generation size [message #618028 is a reply to message #122277] |
Mon, 12 May 2008 16:40  |
Eclipse User |
|
|
|
Hi David,
Do you mean the synthetic id generated by Teneo? As a standard this is a long. I a bit reluctant to
make this option driven because then there'll be yet another option and I am not sure that the
benefit is that large. See here for a discussion about size differences:
http://www.kennygorman.com/wordpress/?p=244
when using an int versus bigint.
Another way (instead of an option) I thought of is that you can override the IdMapper and set your
own CustomIdMapper using the Teneo extension mechanism. This custom id mapper can then map id's the
way you want. However, I can now see that this part is not so easy to override. If you want that
then please enter a bugzilla for making the IdMapper easier to override.
gr. Martin
david wrote:
> Hi,
>
> Is it possible to change the automatic auto increment key generated for
> Id columns to an INT from a BIGINT? Not sure how much advantage there is
> to be had, but I have a few dozen tables with over 1 Million rows and
> thought it might reduce the size and many have few columns in them.
>
> Thx.
>
> David
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [Teneo] Unique Id generation size [message #618029 is a reply to message #122311] |
Tue, 13 May 2008 06:18  |
Eclipse User |
|
|
|
Hi,
Thx for the reference, it appears not to be worth it. I also build very
large HashMaps for looking up these Ids for performance reasons. 8
million of them, but even then it only adds 8 bytes per lookup ( extra 4
bytes in the key and extra 4 bytes in the value ), a total of 32MB in
HashMaps that are taking 2GB of RAM is not too bad.
Thx,
David
TMartin Taal wrote:
> Hi David,
> Do you mean the synthetic id generated by Teneo? As a standard this is a
> long. I a bit reluctant to make this option driven because then there'll
> be yet another option and I am not sure that the benefit is that large.
> See here for a discussion about size differences:
> http://www.kennygorman.com/wordpress/?p=244
> when using an int versus bigint.
>
> Another way (instead of an option) I thought of is that you can override
> the IdMapper and set your own CustomIdMapper using the Teneo extension
> mechanism. This custom id mapper can then map id's the way you want.
> However, I can now see that this part is not so easy to override. If you
> want that then please enter a bugzilla for making the IdMapper easier to
> override.
>
> gr. Martin
>
> david wrote:
>> Hi,
>>
>> Is it possible to change the automatic auto increment key generated
>> for Id columns to an INT from a BIGINT? Not sure how much advantage
>> there is to be had, but I have a few dozen tables with over 1 Million
>> rows and thought it might reduce the size and many have few columns in
>> them.
>>
>> Thx.
>>
>> David
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03524 seconds