I am running a web application which has to scan (MySQL query on a particular column) a huge MySQL table, which has over 100,000 records.
The problem is that when a user requests another page from the same web application while the results are being fetched from the scan, the browser takes a long time to display the page.
How can I cancel the scan (or the MySQL query) while the new page is being requested?