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 A601A200CB8 for ; Sat, 1 Jul 2017 23:27:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A4D83160BEA; Sat, 1 Jul 2017 21:27:04 +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 EB247160BDF for ; Sat, 1 Jul 2017 23:27:03 +0200 (CEST) Received: (qmail 37756 invoked by uid 500); 1 Jul 2017 21:27:02 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 37746 invoked by uid 99); 1 Jul 2017 21:27:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jul 2017 21:27:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 7C054C0AA6 for ; Sat, 1 Jul 2017 21:27:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.211 X-Spam-Level: X-Spam-Status: No, score=-99.211 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Gs2nWIs4Rub6 for ; Sat, 1 Jul 2017 21:27:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id B7A815F299 for ; Sat, 1 Jul 2017 21:27:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3FD5FE069F for ; Sat, 1 Jul 2017 21:27:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 10D0F20D11 for ; Sat, 1 Jul 2017 21:27:00 +0000 (UTC) Date: Sat, 1 Jul 2017 21:27:00 +0000 (UTC) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-6942) Utilise additional statistics for selectivity estimates. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 01 Jul 2017 21:27:04 -0000 [ https://issues.apache.org/jira/browse/DERBY-6942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16071408#comment-16071408 ] Bryan Pendleton commented on DERBY-6942: ---------------------------------------- Let me see if I get that, too: the cost of the table scan is the same in either case, because we have to read every page of the table and evaluate the predicate against each row. However, the number of rows in the result depends very heavily on the accuracy of the selectivity estimate. So if the results of the table scan go on to be used in a join with some other table, then the cost of the join will depend on the number of rows we read from the base table, and we can now have a more accurate estimate of that. > Utilise additional statistics for selectivity estimates. > -------------------------------------------------------- > > Key: DERBY-6942 > URL: https://issues.apache.org/jira/browse/DERBY-6942 > Project: Derby > Issue Type: Sub-task > Components: SQL > Reporter: Harshvardhan Gupta > Assignee: Harshvardhan Gupta > Priority: Minor > Attachments: DERBY-6942.diff, z12.txt, z13.txt > > -- This message was sent by Atlassian JIRA (v6.4.14#64029)