openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Droscher <>
Subject CLOB loading - query per row
Date Tue, 07 Feb 2012 00:19:55 GMT

Just wondering if anyone had encountered a similar issue to us with CLOB
loading and/or can explain the behaviour:

When we have entities with CLOB fields and do a EntityManager.get() of one
of those objects, OpenJPA will load the CLOBs with the rest of the data as
part of a single query. But when we load the same object using a named
query, for example "SELECT t FROM Thing t WHERE t.code = ?1", OpenJPA
generates a separate SQL query for each CLOB row after it has loaded the
rest of the data for that object. We see this behaviour even when we are
only querying for a single field of the object (not even the CLOB field).
This is having a big impact on performance for us as it involves a lot more
roundtrips to the DB.

FYI we are running OpenJPA 1.2.1


View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message