Hello, i'm using SQL-Server with a 3 million record table. Everytime i use setParameter instead of an ordinary string it slows down from 75ms to 40s.
I have been doing some more digging and it seems that setParameter creates a prepared statement, that is to say a precompiled query which is supposed to slow down the first time its executed but faster if it is executed later on in the same connection.
The things is that i prefer to use a statement instead of a prepared statement but How can I use HQL and setParameter to create statements instead of prepared statements?
Regards
|