A query is taking more than a minute to retrieve the data (Due to larger volume of data) from the database.
I need to stop its execution.
I know that, we can set
"timeout" attribute in the select tag (For a single query alone) or
"defaultStatementTimeout" attribute in settings tag (SqlMapConfig.xml - For all the query) to forcibly terminate the query in execution.
or
By doing the above configuration, IBatis will throw
"User cancelled request" error and terminates the execution.
Do we have any other way to terminate the execution?
My Scenario:
When user requests for 3 years data, it takes more than a minute to fetch data from the database.
In the meantime, when the user requests for 1 day's data or sends a "cancel" request, I have to forcibly terminate the previous execution (3 years data retrieval) because it is affecting performance even with limited number of users.
NOTE
I didn't used any of the setting above.
Please provide me solution for this.
Thanks in advance
.