How to set statement timeout for query execution

前端 未结 1 426
我寻月下人不归
我寻月下人不归 2020-12-24 02:20

In my web app some postgres sql queries take along time for execution. I want set statement timeout for only part of them.

One part of queries must canceled by timeo

相关标签:
1条回答
  • 2020-12-24 02:56

    You should look at the extensions provided with SQLAlchemy <= 0.6:

    http://www.sqlalchemy.org/docs/06/orm/interfaces.html

    There are hooks where you could stick in your code for individual operations.

    SQLAlchemy 0.7+ now has an event system...there might be something similar. See

    http://www.sqlalchemy.org/docs/core/events.html

    0 讨论(0)
提交回复
热议问题