【发布时间】:2018-10-10 20:14:13
【问题描述】:
我将烧瓶与 SQLAlchemy、SQLAlchemy-Searchable 和 PostgreSQL(表中的 3m 行)一起使用。 count() 函数非常慢,所以我想使用 count_estimate() (https://wiki.postgresql.org/wiki/Count_estimate)
q = Article.query.search(query,sort=True)
answers = q.limit(5).all()
如何将 SQLAlchemy 的查询与原始 sql 连接起来?谢谢。
【问题讨论】:
标签: python flask sqlalchemy