Re: Cancel threads after timeout

Discussion in 'Python' started by Cameron Simpson, Jan 27, 2013.

  1. On 26Jan2013 09:48, Matt Jones <> 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.

    Cheers,
    --
    Cameron Simpson <>

    Do not taunt Happy Fun Coder.
    Cameron Simpson, Jan 27, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hyperboreean

    Cancel threads after timeout

    hyperboreean, Jan 26, 2013, in forum: Python
    Replies:
    0
    Views:
    118
    hyperboreean
    Jan 26, 2013
  2. Jason Friedman

    Re: Cancel threads after timeout

    Jason Friedman, Jan 26, 2013, in forum: Python
    Replies:
    0
    Views:
    110
    Jason Friedman
    Jan 26, 2013
  3. Matt Jones

    Re: Cancel threads after timeout

    Matt Jones, Jan 26, 2013, in forum: Python
    Replies:
    0
    Views:
    117
    Matt Jones
    Jan 26, 2013
  4. dieter
    Replies:
    0
    Views:
    134
    dieter
    Jan 27, 2013
  5. Jason Ma

    Re: Cancel threads after timeout

    Jason Ma, Jan 27, 2013, in forum: Python
    Replies:
    0
    Views:
    130
    Jason Ma
    Jan 27, 2013
Loading...

Share This Page