Hibernate LAZY slower then EAGER

T

Tomasz Bozek

Hi

I'm using ejb 3 on jboss and it's strange beacuse when i'm usaing fet type
lazy it's slower then fetch type eager. What is more strange that when i
don't write anyting it has the same time as eager

example 10k selects on 2 tables each 100k data relation onetoone

user -> personal data


LAZY : 16 s
EAGER: 11 s
DEFAULT (no definition):10 s

why ???
 
D

Daniel Pitts

Tomasz said:
Hi

I'm using ejb 3 on jboss and it's strange beacuse when i'm usaing fet type
lazy it's slower then fetch type eager. What is more strange that when i
don't write anyting it has the same time as eager

example 10k selects on 2 tables each 100k data relation onetoone

user -> personal data


LAZY : 16 s
EAGER: 11 s
DEFAULT (no definition):10 s

why ???
Eager is the default, so it would be the same time as eager.
Lazy can be slower depending on the paths you take. If you don't access
any lazy-loaded data, then it won't transfer it. Eager data will always
be loaded, whether or not you use it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top