Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Teneo] Redundant indexes in database
[Teneo] Redundant indexes in database [message #909083] Thu, 06 September 2012 13:55 Go to next message
Eclipse UserFriend
I'm using Eclipse 4.2 and Teneo. When I browse the database in
phpmyadmin, I'm seeing lots of warning messages like these:

"The indexes MyClass_attribute and mypkg_myclass_attribute seem to be
identical and one of them could possibly be removed."

I am using the QualifyingEntityNameStrategy.

Is there a way suppress the non-qualified indexes?

TIA
Marius
Re: [Teneo] Redundant indexes in database [message #909087 is a reply to message #909083] Thu, 06 September 2012 14:02 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Marius,
Hmm, teneo/hibernate will not remove existing indexes, is it possible that some of these indexes are from a previous run
with a different option setting?

Can you generated/check the hbm to see if indeed indexes are duplicated?

gr. Martin

On 09/06/2012 03:55 PM, Marius Gröger wrote:
> I'm using Eclipse 4.2 and Teneo. When I browse the database in
> phpmyadmin, I'm seeing lots of warning messages like these:
>
> "The indexes MyClass_attribute and mypkg_myclass_attribute seem to be
> identical and one of them could possibly be removed."
>
> I am using the QualifyingEntityNameStrategy.
>
> Is there a way suppress the non-qualified indexes?
>
> TIA
> Marius
>
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Teneo] Redundant indexes in database [message #909096 is a reply to message #909087] Thu, 06 September 2012 14:17 Go to previous messageGo to next message
Eclipse UserFriend
Hello Martin,

On 06.09.2012 16:02, Martin Taal wrote:
> Hi Marius,
> Hmm, teneo/hibernate will not remove existing indexes, is it possible
> that some of these indexes are from a previous run with a different
> option setting?

No, I have dropped/created the database.

> Can you generated/check the hbm to see if indeed indexes are duplicated?

Well, its mostly black magic to me but...

<key update="true" foreign-key="mypkg_myclass_attribute">
<column name="`myclass_attribute_id`" unique="false"
index="mypkg.MyClass_attribute"/>
</key>
<list-index column="`myclass_attribute_idx`"/>

.... could the definition index= and list-index be the cause for this?

Regards
Marius
Re: [Teneo] Redundant indexes in database [message #909270 is a reply to message #909096] Thu, 06 September 2012 21:01 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
He Marius,
No the list-index holds the index number in the list.

I wonder where the MyClass_attribute index is coming from...

You can disable foreign key generation in the hbm by setting this option to false:
teneo.naming.set_foreign_key_name

(default is true).

gr. Martin

On 09/06/2012 04:17 PM, Marius Gröger wrote:
> Hello Martin,
>
> On 06.09.2012 16:02, Martin Taal wrote:
>> Hi Marius,
>> Hmm, teneo/hibernate will not remove existing indexes, is it possible
>> that some of these indexes are from a previous run with a different
>> option setting?
>
> No, I have dropped/created the database.
>
>> Can you generated/check the hbm to see if indeed indexes are duplicated?
>
> Well, its mostly black magic to me but...
>
> <key update="true" foreign-key="mypkg_myclass_attribute">
> <column name="`myclass_attribute_id`" unique="false"
> index="mypkg.MyClass_attribute"/>
> </key>
> <list-index column="`myclass_attribute_idx`"/>
>
> .... could the definition index= and list-index be the cause for this?
>
> Regards
> Marius
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Re: [Teneo] Redundant indexes in database [message #909470 is a reply to message #909270] Fri, 07 September 2012 07:45 Go to previous message
Eclipse UserFriend
On 06.09.2012 23:01, Martin Taal wrote:
> I wonder where the MyClass_attribute index is coming from...
>
> You can disable foreign key generation in the hbm by setting this
> option to false: teneo.naming.set_foreign_key_name

Thanks for the pointer in this direction. Actually I found out that for
some historic reason I had set up the store with add_index_for_fk=true.
If I switch this to false, the duplicates go away.

Regards
Marius
Previous Topic:CDO Hibernate Store | Programtically invoke
Next Topic:Emap with EMF (in ecorediagram)
Goto Forum:
  


Current Time: Thu Apr 25 21:15:36 GMT 2024

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

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

Back to the top