Re: Cancel threads after timeout
On 26Jan2013 09:48, Matt Jones <email@example.com> wrote:
| It sounds like your real problem is with your SQL query... Is that part of
| this problem under your control? Can you break the query into smaller,
| quicker, pieces that you can run in a reasonable amount of time?
Another option to investigate is whether you can ask the database itself
to limit the run time of a query. Of course, that will abort the query
but so does your proposed solution.
Another approach might be to simply run each query regularly (with a
pause between so the database is not spending its whole life running
your query). Snapshot each latest result. Compute your report from the
latest pair of snapshots at any given time on an independent schedule.
It may not be valid for what you need, but if it is then this decouples
you from the query time completely.
Cameron Simpson <firstname.lastname@example.org>
Do not taunt Happy Fun Coder.
|All times are GMT. The time now is 01:47 PM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.