Long Idle times on SQL-ODBC Connection

In the SQL Anywhere performance monitoring we are seeing extremely long idle times. In this case an idle time of 09:58 for a query that executed in 15ms. The query is a previous loop on a view for page-loading a standard Clarion browse. The application is compiled in Clarion 11.1.13815 and the ODBC driver is used to connect to the database.

The main problem is that this is preventing us from finding the real long running queries that could be optimized.

IdleStatementProperties 002

No user has ever complained about having to wait 10 minutes for a browse to be loaded. This case is an example, there are many other queries that have a very long idle time. We can see in the rest of the log that other queries are executed normally during the idle time.

What does Clarion do to create such long idle times and can we change a setting or change code to eliminate or reduce this behavior?

I’m not familiar with SQL Anywhere, but Clarion uses a lot of Cursors and then fetches a bunch at a time. The idle time might be the time between fetches, which would roughly equate to people paging down.