[ https://issues.apache.org/jira/browse/HIVE-7999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14249562#comment-14249562 ]
David Schorow commented on HIVE-7999: ------------------------------------- I believe this issue will be resolved by HIVE-8295. I suggest this be closed as a dup of that issue. That introduces a fix where the query only selects 1,000 partitions at a time. > Hive metastore query too long when select * on table with large number of > partitions > ------------------------------------------------------------------------------------- > > Key: HIVE-7999 > URL: https://issues.apache.org/jira/browse/HIVE-7999 > Project: Hive > Issue Type: Bug > Components: Metastore > Reporter: Chu Tong > > When it comes to selecting * on a Hive table with large number of partitions, > a query like this: > SELECT PARTITIONS.PART_ID, SDS.SD_ID, SDS.CD_ID, SERDES.SERDE_ID, > PARTITIONS.CREATE_TIME, ... SERDES.SLIB from PARTITIONS LEFT OUTER JOIN SDS > ON PARTITIONS.SD_ID = SDS.SD_ID LEFT OUTER JOIN SERDES ON SDS.SERDE_ID = > SERDES.SERDE_ID where PART_ID in (1,2,3,4 ... 10000000 ... > is generated and executed on metastore, however, due the query lists all the > partitions in it, SQL server is unable to compile/execute such a long query > and causing the whole query to fail. -- This message was sent by Atlassian JIRA (v6.3.4#6332)