Re: Query Timeout Question
От | Craig Ringer |
---|---|
Тема | Re: Query Timeout Question |
Дата | |
Msg-id | 4EE17226.40206@ringerc.id.au обсуждение исходный текст |
Ответ на | Query Timeout Question ("feng.zhou" <feng.zhou@wellintech.com>) |
Список | pgsql-sql |
On 12/09/2011 09:44 AM, feng.zhou wrote:
First: You're using a very old patch release with known bugs. Update to 8.4.10 .
As for the timeout: PostgreSQL doesn't support query timeouts. It supports a session-level statement timeout. I don't know whether the ODBC driver uses that or not. Examine the ODBC `mylog' output after enabling psqlODBC debugging, and examine the server log after turning on query logging, so you can see what the ODBC driver actually asks the server for when you set a query timeout.
--
Craig Ringer
Hi
I set query timeout in code by using SQLSetStmtAttr ODBC API .
SQLSetStmtAttr( StatementHandle, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)timeout, 0 ) ;
SQLExecute(StatementHandle);
But I find this setting has no effect.Before adding timeout setting, SQLExecute costs 47 seconds.After adding timeout, costing time is same.
First: You're using a very old patch release with known bugs. Update to 8.4.10 .
As for the timeout: PostgreSQL doesn't support query timeouts. It supports a session-level statement timeout. I don't know whether the ODBC driver uses that or not. Examine the ODBC `mylog' output after enabling psqlODBC debugging, and examine the server log after turning on query logging, so you can see what the ODBC driver actually asks the server for when you set a query timeout.
--
Craig Ringer
В списке pgsql-sql по дате отправления: