Flask_sqlalchemy - your ORM is not your DBMS. You can use it with PostgreSQL as your database.
How do you query your database, which is important in your case.
1-core sqlalchemy
SQLAlchemy allows you to execute raw SQL commands, so you can write your own query commands yourself, rather than using Model.query.filter() .
Thus, one of the options is to write your select expressions yourself and more efficiently.
2-ELK
elastic search contains many effective algorithms for you! you can rely on elasticsearch to search your database.
source share