Is the following behaviour normal running this kind of query?
[pseudo language]
Code:
select store.products where store.id=?
The sql produced looks like this
[pseudo language again]:
Code:
select id from product joined with a store where store.id=?
select * from product where id=?
select * from product where id=?
....
In other words, the query first retrieves the ids of and then performs a select for each of the found ids.
I guess it would be faster to achieve it with a product.* in the first query.
I played around with fetch_size and batch_size but with no success.
What's the deal?
Thanx
Robcos
Code:
#Hibernate properties
#Thu Jan 22 10:01:51 CET 2004
hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
hibernate.jdbc.use_streams_for_binary=true
hibernate.show_sql=true
hibernate.use_outer_join=true
hibernate.jdbc.batch_size=30
hibernate.jdbc.fetch_size=30
hibernate.cache.use_query_cache=true