我意识到
dbGetQuery comes with a default implementation that calls dbSendQuery, then dbFetch, ensuring that the result is always freed by dbClearResult.
和
dbClearResult frees all resources (local and remote) associated with a result set. In some cases (e.g., very large result sets) this can be a critical step to avoid exhausting resources (memory, file descriptors, etc.)
但是我的团队刚刚经历了我们进入 MySQL 的锁定表,kill pid
我想知道 - 有没有办法让使用DBI
包提交的查询超时?
我正在寻找但找不到相当于
dbGetQuery(conn = connection, 'select stuff from that_table', timeout = 90)
我试过这个,并分析了有和没有参数集的函数,它似乎没有做任何事情;为什么它会,如果dbClearResult
总是在玩?