Hi,
Is it possible to specify to create indexes on each column of the
primary key of an association table ( the third table for many-to-many
association ) ?
For example, hbm2ddl will generate :
create table T_PERSONADDRESS (
PERSON_ID number(10,0) not null,
ADDRESS_ID number(10,0) not null,
primary key (PERSON_ID, ADDRESS_ID)
);
I would like he is able to add the following indexes :
CREATE INDEX INDEX1 ON T_PERSONADDRESS(PERSON_ID);
CREATE INDEX INDEX2 ON T_PERSONADDRESS(ADDRESS_ID);
It is important because with a select like this :
select * from t_personaddress where person_id = 1 ;
Oracle will use a full fast index scan if there is no index.
and with the indexes, a "table access by index row id" will be used ( faster ).
But i have seen no mean to specify these indexes in the hibernate
mapping for the many-to-many relation.
|