I have a query
SELECT `property_category_name` as `property_category`
FROM `listings`
WHERE (
community_name LIKE '%Sun%'
)
AND `listings`.`property_for` = 'sale'
LIMIT
Now when i am executing this query manually it takes almost 0.002 seconds and return with No Row as result. Now the issue comes when i run the same query from my php code.
it gets stuck there
show full processlist
It shows the below
and it will stay like this until i restart the server or kill this process, in reality it shouldn’t take this much time and should give no row as result.
I didn’t find any solution for this but the other thing i noticed in sys-> x$processlist table is below. It is the same query but in wait/io/table/sql/handler state.
I am attaching the screenshot of the processlist table below
it will stay like this until i restart the database or kill the process manually. I tried to find a solution but nothing worked. Database is hosted on AWS RDS mysql 8.0. Below is the screenshot of the configuration.