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 1D22E200B68 for ; Thu, 4 Aug 2016 23:02:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1B861160AB2; Thu, 4 Aug 2016 21:02:22 +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 8AED5160AAB for ; Thu, 4 Aug 2016 23:02:21 +0200 (CEST) Received: (qmail 89054 invoked by uid 500); 4 Aug 2016 21:02:20 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 88983 invoked by uid 99); 4 Aug 2016 21:02:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2016 21:02:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 82ED12C029E for ; Thu, 4 Aug 2016 21:02:20 +0000 (UTC) Date: Thu, 4 Aug 2016 21:02:20 +0000 (UTC) From: "Parth Chandra (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-4826) Query against INFORMATION_SCHEMA.TABLES degrades as the number of views increases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 04 Aug 2016 21:02:22 -0000 Parth Chandra created DRILL-4826: ------------------------------------ Summary: Query against INFORMATION_SCHEMA.TABLES degrades as the number of views increases Key: DRILL-4826 URL: https://issues.apache.org/jira/browse/DRILL-4826 Project: Apache Drill Issue Type: Bug Reporter: Parth Chandra Assignee: Parth Chandra Queries against INFORMATION_SCHEMA.TABLES and INFORMATION_SCHEMA.VIEWS slow down as the number of views increases. BI tools like Tableau issue a query like the following at connection time: {code} select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE from INFORMATION_SCHEMA.`TABLES` WHERE TABLE_CATALOG LIKE 'DRILL' ESCAPE '\' AND TABLE_SCHEMA <> 'sys' AND TABLE_SCHEMA <> 'INFORMATION_SCHEMA'ORDER BY TABLE_TYPE, TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME {code} The time to query the information schema tables degrades as the number of views increases. On a test system: || Views || Time(secs) || |500 | 6 | |1000 | 19 | |1500 | 33 | This can result in a single connection taking more than a minute to establish. The problem occurs because we read the view file for every view and this appears to take most of the time. Querying information_schema.tables does not, in fact, need to open the view file at all, it merely needs to get a listing of the view files. Eliminating the view file read will speed up the query tremendously. -- This message was sent by Atlassian JIRA (v6.3.4#6332)