I have this issue on our production server. The application stack is,
- Java Web App on Tomcat 6.0.18
- iBatis data access layer
- MySQL 5.0 database
- CentOS
The system is deployed on virtual server having around 256 MB memory.
Real problem:
The query like,
select * from customer
executes in around 10 seconds however if the following query is executed,
select * from customer where code like '%a%'
right after executing the above query, the system goes into indefinite processing and ultimately forces Tomcat to restart !.
Table statistics: - No. of records : 5000 - Primary Key : code
The same query PHP MyAdmin executes in around 4 seconds.
Do you think it could be MySQL problem ? Any idea to debug this. I am right now enabling the detailed logs and will keep updating this question with my findings but would appreciate your db insights.