Is there a feature in PHP PDO or in MySQL that automatically aborts and returns with an empty result set when it's executing more than, say, 2 seconds?
Did some searches and nothing helpful was found. I think this would probably be great for user experience, especially with trivial stats data that are not so important.
Tried to come up with a way in PHP to do this but not sure how to monitor the execution time of PDO:execute()
when it's not returned yet.
Any idea?