From issues-return-95875-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon May 6 12:07:03 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id DC422180763 for ; Mon, 6 May 2019 14:07:02 +0200 (CEST) Received: (qmail 90525 invoked by uid 500); 6 May 2019 12:07:02 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 90516 invoked by uid 99); 6 May 2019 12:07:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 May 2019 12:07:02 +0000 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 AC995E2B9B for ; Mon, 6 May 2019 12:07: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 B807725816 for ; Mon, 6 May 2019 12:07:00 +0000 (UTC) Date: Mon, 6 May 2019 12:07:00 +0000 (UTC) From: "Vladimir Ozerov (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (IGNITE-6079) SQL: implement base table statistics MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-6079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vladimir Ozerov closed IGNITE-6079. ----------------------------------- > SQL: implement base table statistics > ------------------------------------ > > Key: IGNITE-6079 > URL: https://issues.apache.org/jira/browse/IGNITE-6079 > Project: Ignite > Issue Type: Task > Components: sql > Affects Versions: 2.1 > Reporter: Vladimir Ozerov > Priority: Major > Labels: performance, sql-engine > > Ignite lacks cost-based optimizer what doesn't allow us to build efficient execution plans. Let's start moving in this direction. > The ticket is about creating local statistics for tables. In the first phase they will not be shared between nodes, neither they will participate in query optimization. The ultimate goal of this ticket is to start gathering some info in the background and provide necessary internal infrastructure and APIs for that. > *1. API* > Let's start with a single method {{GridQueryProcessor.rebuildStatistics()}}, which will build stats for all existing tables. > Then implement ANALYZE command [1] > *2. Infrastructure* > - Statistics are transient, not persisted > - We need a background worker which will re-build them on regular basis and replace old with new using copy-on-write approach > - Statistics are created for indexed (i.e. sorted) columns > - Sampling should be used to avoid full table scan > *3. Statistics types* > - Height-based: the whole range is split into N pieces, so that exactly M/N entries are located between X and X+1 piece, where M is number of records > One statistics type should be enough in the first iteration. > [1] http://h2database.com/html/grammar.html#analyze -- This message was sent by Atlassian JIRA (v7.6.3#76005)