I recently upgraded my application to Hibernate 6. After running tests on it for about 30 minutes, the Oracle DB runs out of TEMP DB space. We store a lot of BLOBS. Any suggestions of things I could be doing wrong?
I don’t know anything about Oracle and its TEMP space, but can you nail down what queries cause this? We are aware of a situation where mapping BLOB/CLOB to a materialized form i.e.
String causes lots of JDBC interactions in some scenarios.
You should IMO first try to figure out what query is causing this.
Thank you for the response. I finally did nail down what was causing the issue. When the LOB is returned from the DB, I am storing it in a java.sql.Blob object. I quickly modified the code to store it as a byte and the problem went away. No more TEMP space problems in Oracle. This did slow my application down some, though.
I retrieve the LOB from the database in my persistence layer and populate an Entity with it, storing it in the Blob object. I then pass this Entity through my business logic layer and up to the REST layer, thus leaving the transaction. Is my usage of this object incorrect?
I don’t know what Oracle does here, so you might have to ask this question about TEMP space consumption in Oracle forums.
I then pass this Entity through my business logic layer and up to the REST layer, thus leaving the transaction. Is my usage of this object incorrect?
I don’t see an apparent problem, but I’d generally advise not to load data (i.e. the BLOB) if you are not serializing it through your HTTP layer. It’s just unnecessary work and maybe the Oracle JDBC driver even does something special with BLOBs when a transaction is finished, which leads to your problems.