[DB-SIG] Can the cursor.execute method have a timeout specified?
misa at redhat.com
Fri Aug 6 19:59:26 CEST 2004
On Fri, Aug 06, 2004 at 05:24:55PM +0000, Anjum Naseer wrote:
> 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.
> c = adodbapi.connect("Provider=SQLOLEDB;Initial Catalog=Test;Data
> Source=(local);Integrated Security=SSPI")
> csr = c.cursor()
> csr.arraysize = 1000
> Thanks in advance.
> Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo
> DB-SIG maillist - DB-SIG at python.org
More information about the DB-SIG