Fwd: Re: [DB-SIG] Can the cursor.execute method have a timeout specified?

Mihai Ibanescu misa+db-sig at redhat.com
Fri Aug 6 20:04:36 CEST 2004

On Fri, Aug 06, 2004 at 05:24:55PM +0000, Anjum Naseer wrote:
> Hi,
> I am running a query which takes a long time and was wondering if there was 
> any way of specifying a timeout?

Although you probably fake a timeout through signal handlers, I doubt you
really want to do that. A query that runs for a long time is a bad query; you
should look into optimizing the query or the schema or breaking out the query
into smaller chunks.

Run a couple of these queries and the database backend will not be happy. Much
less will your DBA.

My opinion at least.

More information about the DB-SIG mailing list