ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "michael.griggs" <michael.gri...@gridgain.com>
Subject Timeout on a SQL query issues another SQL query to generate EXPLAIN
Date Wed, 15 Mar 2017 18:07:03 GMT
In IgniteH2Indexing.java#executeSqlQueryWithTimer we automatically issue a
second query to "EXPLAIN" why a query has timed out.  I think we should make
optional the automatic issuance of a second "EXPLAIN" query.  When a query
times out it could very well be due to high load on the system, and issuing
a second query for every timed-out one will only increase system load,
leading to more timeouts, and so on...
            ResultSet rs = executeSqlQuery(conn, stmt, timeoutMillis,
cancel);            long time = U.currentTimeMillis() - start;           
long longQryExecTimeout =
schemas.get(schema(space)).ccfg.getLongQueryWarningTimeout();            if
(time > longQryExecTimeout) {                String msg = "Query execution
is too long (" + time + " ms): " + sql;                ResultSet plan =
executeSqlQuery(conn, preparedStatementWithParams(conn, "EXPLAIN " + sql,                
  
params, false), 0, null);
What do others think?



--
View this message in context: http://apache-ignite-developers.2346864.n4.nabble.com/Timeout-on-a-SQL-query-issues-another-SQL-query-to-generate-EXPLAIN-tp15475.html
Sent from the Apache Ignite Developers mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message