Oracle provides several pseudocolumns, and
ROWID is one of them. The
ROWID pseudocolumn specifies the address of the underlying database record, and according to Oracle documentation, it’s the fastest way to reference a table row.
As explained on Ask TOM, there are some operations that might lead to a ROWID change (e.g. partitioning or compacting tables). If that’s the case, then you should not rely on the ROWID pseudocolumn since its value iss no longer consistent.
If your database never executes an operation that triggers a ROWID modification, then you should consider using this technique.
In this article, I’m going to show you how you can access a database record by its
ROWID when using Hibernate.
Continue reading “The fastest way to update a table row when using Hibernate and Oracle”
One of my major goals for Hibernate is to make sure we offer all sorts of performance improvements to reduce transaction response time and increase throughput. In Hibernate 5.2.10, we addressed the HHH-11542 Jira issue which allows you now to delay the database connection acquisition for resource-local transactions as well.
In this article, I’m going to explain how Hibernate acquires connections and why you want it to delay this process as long as possible.
Continue reading “Why you should always use hibernate.connection.provider_disables_autocommit for resource-local JPA transactions”
As simple as JPA annotations might be, it’s not always obvious how efficient they are behind the scenes. In this article, I’m going to show you what is the best way to use the JPA
@ManyToMany annotation when using Hibernate.
Continue reading “The best way to use the @ManyToMany annotation with JPA and Hibernate”
While developing Hibernate, I need to test the code base against a plethora of relational database systems: Oracle, SQL Server, PostgreSQL, MySQL, MariaDB, Informix, and of course DB2.
However, having all these databases installed on my system is far from ideal, so I rely a lot on Docker for this task. In this article, I’m going to show how easily you can install DB2 on Docker and set up the JDBC connection so that you can run Hibernate tests on DB2.
Continue reading “How to install DB2 Express-C on Docker and set up the JDBC connection properties”
One of my readers has recently asked me to answer this StackOverflow question, and because the question is very interesting, I decided to turn the answer into a blog post.
In this article, I’m going to show you how you can get access to database table metadata using Hibernate 5 API.
Continue reading “How to get access to database table metadata with Hibernate 5”