hi,
I use Hibernates Criteria API (H2.1.8 and H3.0.5)
database I'm using is MSSQL.
I have a table with more than million of records.
Criteria api generates sql query like this:
Code:
select id as id0_, name as name_0
from tbTable
where (name like ?)
It works well, but it is slow (it think that it wasn't when database was not so big as now)
it is significantly slower than:
Code:
select id as id0_, name as name_0
from tbTable
where (name like 'somename%')
the latter is 12 times faster (in mssql server)
Is it possible to force hibernate to generate these sql queries without '?'
I had a quick look at source code, but I didn't found option like this.
Thank you
Radim Chlad