slow sql server DB reads
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

slow sql server DB reads

From: bart <smap@scarlet.be>
Date: Mon May 23 2005 - 23:15:03 CEST

I run a python website on a IIS server. I replaced my flat file DB
with SQL server, but the reads are very slow. 7 seconds for 3 querrys
like these

conn= adodbapi.connect( "Provider=SQLOLEDB.1;Persist Security
Info=False;User ID=sa;Password=xxx;Initial Catalog=dlpl;Data
Source=(local)" )
        crsr = conn.cursor()
        sql = "select SessionKey, SessionValue from ASPSessionState
where GUID='%s'" % self.id
        crsr.execute(sql)
        while 1:
            info = crsr.fetchone()
            if not info:
                break
            strKey = str(info[0])

Opening the database is already good for 2 seconds.
Anyone know how to speed it up?
Received on Thu Sep 29 16:13:02 2005