Multiple condition Search using CriteriaBuilder


I am using hibernate version: 5.2.17.Final
and MYSQL as a DB

Here my generated query is:
select propertyde0.PropertyId as col_0_0, propertyde0.OwnerName as col_1_0, propertyde0.City as col_2_0, propertyde0.State as col_3_0 from PropertyDetail propertyde0 where propertyde0.State=‘CA’ and propertyde0.IsPropertyClaimed=‘0’ and propertyde0.IsDeleted=‘0’ and propertyde0.City=‘BRENTWOOD’ and (propertyde0.OwnerName like ‘%VE%’)

I am searching in 2.7 GB table.

I have added Indexing on columns.

Some time it searches the desired result but sometimes it gives timeouts.

is there any suggestions on how to resolve this problem

Show us the execution plan in the JSON format for this query.

@vlad, Could not get your point.

It gives connection timeout.

Here’s a link with what you need to do to get the execution plan

it works for me.
Thanks for your support.