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 F1C14200BCC for ; Tue, 15 Nov 2016 01:44:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id F0473160B0F; Tue, 15 Nov 2016 00:44:05 +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 45F75160B06 for ; Tue, 15 Nov 2016 01:44:05 +0100 (CET) Received: (qmail 13453 invoked by uid 500); 15 Nov 2016 00:44:04 -0000 Mailing-List: contact dev-help@hawq.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hawq.incubator.apache.org Delivered-To: mailing list dev@hawq.incubator.apache.org Received: (qmail 13438 invoked by uid 99); 15 Nov 2016 00:44:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2016 00:44:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BB33A180617 for ; Tue, 15 Nov 2016 00:44:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -7.018 X-Spam-Level: X-Spam-Status: No, score=-7.018 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 3CAqrZElRds4 for ; Tue, 15 Nov 2016 00:44:01 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id B5B705F47F for ; Tue, 15 Nov 2016 00:44:00 +0000 (UTC) Received: (qmail 13342 invoked by uid 99); 15 Nov 2016 00:43:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Nov 2016 00:43:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CA2D0E00C7; Tue, 15 Nov 2016 00:43:59 +0000 (UTC) From: dyozie To: dev@hawq.incubator.apache.org Reply-To: dev@hawq.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-hawq-docs pull request #59: Feature/best pract Content-Type: text/plain Message-Id: <20161115004359.CA2D0E00C7@git1-us-west.apache.org> Date: Tue, 15 Nov 2016 00:43:59 +0000 (UTC) archived-at: Tue, 15 Nov 2016 00:44:06 -0000 Github user dyozie commented on a diff in the pull request: https://github.com/apache/incubator-hawq-docs/pull/59#discussion_r87926788 --- Diff: bestpractices/querying_data_bestpractices.html.md.erb --- @@ -4,6 +4,23 @@ title: Best Practices for Querying Data To obtain the best results when querying data in HAWQ, review the best practices described in this topic. +## Factors Impacting Query Performance + +The number of virtual segments used for a query directly impacts the query's performance. The following factors can impact the degree of parallelism of a query: + +- **Cost of the query**. Small queries use fewer segments and larger queries use more segments. Some techniques used in defining resource queues can influence the number of both virtual segments and general resources allocated to queries. For more information, see [Best Practices for Using Resource Queues](managing_resources_bestpractices.html#topic_hvd_pls_wv). +- **Available resources at query time**. If more resources are available in the resource queue, those resources will be used. +- **Hash table and bucket number**. If the query involves only hash-distributed tables, the query's parallelism is fixed (equal to the hash table bucket number) under the following conditions: + - the bucket number (bucketnum) configured for all the hash tables is the same bucket number for all tables + - the table size for random tables is no more than 1.5 times larger than the size allotted for the hash tables. + + Otherwise, the number of virtual segments depends on the query's cost: hash-distributed table queries will behave like queries on randomly distributed tables. --- End diff -- Yes - that's the correct edit to my edit request :-) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---