Tuesday, August 08, 2006

 

multi-row insert, mysql

# users is a list of (userid, first_name, last_name, company)
c = db.cursor()
c.executemany("""INSERT INTO users
(userid, first_name, last_name, company)
VALUES (%s, %s, %s, %s)""", users)
db.commit()

In MySQLdb, this is converted internally to a multi-row INSERT, which is reported to be 2-3 orders of magnitude faster. Also works for REPLACE.


Friday, August 04, 2006

 

http://www.cites.uiuc.edu/wsg/talks/ipfilter/index.html

http://www.cites.uiuc.edu/wsg/talks/ipfilter/index.html

Thursday, August 03, 2006

 

http://www.sun.com/bigadmin/features/articles/ipfilter.html

http://www.sun.com/bigadmin/features/articles/ipfilter.html

This page is powered by Blogger. Isn't yours?