On Apr 25, 2013, at 2:15 PM, Pedro Werneck <pjwern...@gmail.com> wrote:
> > > I'm using SQLAlchemy with MySQLdb for processing dozen million daily tasks > with Celery. Most of my queries are very quick and the tasks don't wait for > I/O for too long, so I had great results using the eventlet pool for Celery. > However, whenever I hit a chunk of data which is expected to lead to slower > queries, the overall performance suffers a lot, so I guess I can't just let > it block like that. > > I found the eventlet.db_pool, and there's this Nova example using it with > SQLAlchemy and MySQLdb: > > http://bazaar.launchpad.net/~rackspace-titan/nova/sqlalchemy-eventlet/view/head:/nova/db/sqlalchemy/session.py > > However, in an old topic here asking the same about psycopg someone mentions > that this isn't a good example and the guys probably don't know SA very well. > > https://groups.google.com/d/msg/sqlalchemy/CU_kknlnksQ/wI1Xw21vcLgJ the recipe seems to make use of a connection pool provided by eventlet, the rest of what's there isn't very interesting (or necessary). I haven't used eventlet but seems fine to me ? I wouldn't say connection pooling is even very critical. If slow queries are the issue, eventlet would just need to make sure that network requests don't block. It's possible that gevent is more popular, I've had more experience playing with that. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.