Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Unique Id generation size
[Teneo] Unique Id generation size [message #122277] Mon, 12 May 2008 13:16 Go to next message
Eclipse UserFriend
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 #122311 is a reply to message #122277] Mon, 12 May 2008 16:40 Go to previous messageGo to next message
Eclipse UserFriend
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 #122323 is a reply to message #122311] Tue, 13 May 2008 06:18 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:jet editor java syntax coloring
Next Topic:[EMF Compare]icons for remote changes not implemented?
Goto Forum:
  


Current Time: Tue May 06 08:13:32 EDT 2025

Powered by FUDForum. Page generated in 0.03524 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top