Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 958E9200C38 for ; Wed, 15 Mar 2017 19:14:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 941C9160B7C; Wed, 15 Mar 2017 18:14:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D3B69160B60 for ; Wed, 15 Mar 2017 19:14:01 +0100 (CET) Received: (qmail 619 invoked by uid 500); 15 Mar 2017 18:13:58 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 592 invoked by uid 99); 15 Mar 2017 18:13:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Mar 2017 18:13:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BC7E9C0370 for ; Wed, 15 Mar 2017 18:13:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.285 X-Spam-Level: **** X-Spam-Status: No, score=4.285 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id IDfyjJ-dNdGk for ; Wed, 15 Mar 2017 18:13:55 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 308185FC7B for ; Wed, 15 Mar 2017 18:13:55 +0000 (UTC) Received: from mjoe.nabble.com (unknown [162.253.133.57]) by mwork.nabble.com (Postfix) with ESMTP id 3EC8233312C96 for ; Wed, 15 Mar 2017 11:13:53 -0700 (MST) Date: Wed, 15 Mar 2017 11:07:03 -0700 (PDT) From: "michael.griggs" To: dev@ignite.apache.org Message-ID: <1489601223237-15475.post@n4.nabble.com> Subject: Timeout on a SQL query issues another SQL query to generate EXPLAIN MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_62008_1902425231.1489601223249" archived-at: Wed, 15 Mar 2017 18:14:02 -0000 ------=_Part_62008_1902425231.1489601223249 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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. ------=_Part_62008_1902425231.1489601223249--