[
https://issues.apache.org/jira/browse/DRILL-4826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15507131#comment-15507131
]
ASF GitHub Bot commented on DRILL-4826:
---------------------------------------
GitHub user parthchandra opened a pull request:
https://github.com/apache/drill/pull/592
DRILL-4826: Query against INFORMATION_SCHEMA.TABLES degrades as the n…
…umber of views increases
Changed to get information for all views in a single call instead of of one
by one
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/parthchandra/drill DRILL-4826
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/592.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #592
----
commit 07fbb0ac224e53299217263cf2d0510482a4c9b3
Author: Parth Chandra <[email protected]>
Date: 2016-08-04T06:02:01Z
DRILL-4826: Query against INFORMATION_SCHEMA.TABLES degrades as the number
of views
increases
----
> 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)