-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: not in production yet possible performance problem - cache?
PostPosted: Tue Aug 29, 2006 4:17 am 
Newbie

Joined: Wed May 31, 2006 6:40 am
Posts: 19
Hibernate version:
I'm using standard jboss 4.04 ga: it says
11:55:52,108 INFO [Version] Hibernate EntityManager 3.2.0.CR1
11:55:52,139 INFO [Version] Hibernate Annotations 3.2.0.CR1
11:55:52,155 INFO [Environment] Hibernate 3.2 cr2

I'm not in production yet.. but i'm worry about 10.000 (ten thousand) of users asking the seguent complex multi join query,

String ejbQuery = "select distinct entity from DataEvento as entity "
+ "left outer join fetch entity.configurazioneLocali as configurazioneLocaliDataEvento "
+ "left outer join fetch configurazioneLocaliDataEvento.locale "
+ "left outer join fetch entity.multiGeneres "
+ "left outer join fetch configurazioneLocaliDataEvento.ordinePostoPerConfigurazioneLocalis as ordiniPostoLocale "
+ "left outer join fetch ordiniPostoLocale.tipoTitoliPerOrdinePostoPerDataEventos as titoliPerOrdinePosto2 "
+ "left outer join fetch ordiniPostoLocale.ordinePosto "
+ "left outer join fetch titoliPerOrdinePosto2.tipoTitolo "
+ "left outer join fetch titoliPerOrdinePosto2.dataEvento "
+ "where entity.codice = :codice "
+ "and (titoliPerOrdinePosto2.dataEvento = entity)";

luckly i can consider quite static these data... so i think to cache the results: is it possible to cache a bunch of object directly in hibernate or jboss or i have to do it programmatically?

at http://www.hibernate.org/hib_docs/entit ... ation.html
i see that's possible to set the cache by single entity... while i need to cache this results

if i have to do it by myself i do something like the PK to find the right object and the timestamp to define the object validity

Another question.... in my entity i have an association mapped by a column, can i have also the primitive value of this field? for example i got the association:

@ManyToOne(cascade={},
fetch=FetchType.LAZY)

@JoinColumn(name="id_FilePerOrdinePostoPerDataEvento", unique=false, nullable=true, insertable=true, updatable=true)
public FilePerOrdinePostoPerDataEvento getFilePerOrdinePostoPerDataEvento() {
return this.filePerOrdinePostoPerDataEvento;

}

but i'd like to have also

@Column(name="id_FilePerOrdinePostoPerDataEvento", unique=false, nullable=true, insertable=true, updatable=true, length=10)
public String getIdFilePerOrdinePostoPerDataEvento() {
return this.idFilePerOrdinePostoPerDataEvento;

}

is it possible????
thanks to all


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.