php - postgresql 最长执行时间

标签 php postgresql

在 PHP 中是否有与 PostgreSQL 函数一起使用的选项,因此您可以为查询指定最长执行时间?我不想从配置文件中启用它,因为只需要限制某些查询。

最佳答案

在主查询之前从 php 运行一个查询

like

SET statement_timeout TO 5000;

关于php - postgresql 最长执行时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4791510/

相关文章:

php时间函数

php - 使 PHP 回显 <a href= link>

php - 如何在 MacOS 上安装 MySQLi

python - 在 SQLAlchemy 中使用反射表检索列的最大值

sql - 有没有办法在 SQL 中找到活跃用户?

php - 将 RSS 提要输出为 html?

php - 使用 PHP/MySQL 导出大型 CSV 数据的最佳方法是什么?

postgresql 接受动态 dns 主机?

postgresql - 使用 Postgresql 中的表别名访问记录中的列

sql - Postgresql - 如何仅在满足特定条件时插入