I just did little benchmarking with 4812 agents in the database. The variant I have commited here takes 5 minutes 47 seconds for 1000 requests (0.35 seconds per request), the second variant (from further down, the one that fetches only the needed columns) takes 1 minute 38 seconds (0.098 seconds per request). No parallelism is used in either case, but HTTP KeepAlive might be. (Dunno if httplib.HTTPConnection uses that automatically.)