|
|
Re: [Teneo] Unique Id generation size [message #122323 is a reply to message #122311] |
Tue, 13 May 2008 10:18 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
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 #618029 is a reply to message #122311] |
Tue, 13 May 2008 10:18 |
David Wynter Messages: 4624 Registered: July 2009 |
Senior Member |
|
|
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.02511 seconds