When does PreparedStatement triggers a parse on the DB?

We analyse a performance problem with an Oracle DB (19c). The metrics shows us that Oracle parses way too many SQL statements. Since we new the use the PrepareStatement objects we asking how that could be (we don’t have access to the code). One assumption is that they create too many PrepareStatement objects.

Like
User getUser(…) {
PrepareStatement p = con.prepareStatement( “Select * from User u where u.name = ?”)
p.executeQuery();

}
Is our assumption correct, that in this case every call to getUser will force Oracle to trigger a parse for this statement?

No, every connection has a statement cache. Unless you deactivated that, successive calls will reuse the same underlying statement. By the way, this is a forum for Hibernate, so this question is probably better asked in the Oracle forums.

Thanks for the answer. I know that this is a Hibernate forum ;-). But I wanted to know if in this case Hibernate does something which “forces” the DB, in this case Oracle, to do a parse.
Now I know it, I will ask Oracle the same question. Thanks again.