4 ms·
You could do that, but Facata works at a lower level, so for example you can use prepared statements, which SQLAlchemy doesn't support. Also, Facata has better
by tlocke 5y ago
You could do that, but Facata works at a lower level, so for example you can use prepared statements, which SQLAlchemy doesn't support. Also, Facata has better performance and fewer dependencies if you only want to use raw SQL.
- BiteCode_dev 5y agoSQLA automatically creates prepared statements and cache them: https://docs.sqlalchemy.org/en/14/dialects/postgresql.html#prepared-statement-cache https://docs.sqlalchemy.org/en/14/dialects/postgresql.html#p... I get that Facata is a smaller dependency chain. I'm also curioujs about the performance side, what areas is Facata more performant in, and how was it measure?
- tlocke 5y agoThat prepared statement caching is a feature of a particular DBAPI driver rather than SQLAlchemy itself. I take your point though, and I'd say that Facata is designed to be an alternative to DBAPI 2 rather than an alternative to SQLAlchemy. On the performance, I'm basing this on the fact that SQLAlchemy does a lot more than Facata. You're right though, actual measurements would be interesting.
- tlocke 5y agoActually, I retract my comment that Facata has better performance than SQLAlchemy with raw SQL. Really, the only reason I can think of for using Facata over SQLAlchemy is if you don't want the extra functionality that SQLAlchemy gives you.