Why does SQLAlchemy with psycopg2 use_native_unicode have poor performance?
- by Bob Dover
I'm having a difficult time figuring out why a simple SELECT query is taking such a long time with sqlalchemy using raw SQL (I'm getting 14600 rows/sec, but when running the same query through psycopg2 without sqlalchemy, I'm getting 38421 rows/sec).
After some poking around, I realized that toggling sqlalchemy's use_native_unicode parameter in…