From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 1F158243D3 for ; Mon, 14 May 2018 10:12:40 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UlxUUfOZCgn5 for ; Mon, 14 May 2018 10:12:39 -0400 (EDT) Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id AC0DC24393 for ; Mon, 14 May 2018 10:12:36 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 0/4] Move original SQLite's statistics to server References: From: Vladislav Shpilevoy Message-ID: Date: Mon, 14 May 2018 17:12:34 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: Nikita Pettik , tarantool-patches@freelists.org Now the entire patchset LGTM. On 23/04/2018 23:29, Nikita Pettik wrote: > Branch: https://github.com/tarantool/tarantool/tree/np/gh-3253-move-statistics-to-server > Issue: https://github.com/tarantool/tarantool/issues/3253 > > This patch-set is about transfering statistics containing in > SQL specific struct Table and struct Index to the struct index of > Tarantool. Unused statistics are removed at all. > > First patch of the series provides slight optimization of simple > 'SELECT COUNT(*)' query compilation. There is no need to hesistate which > index to choose: always use PK. It also allows to remove one usage of > statistics from index. > > Second patch removes obsolete SQLite calculation of average tuple size: > it is always possible to get size of space, count of tuples and divide > them. > > Third patch adds simple wrapper to fetch tuple count of given > table from server. > > The last and the main one, introduces new member of index's opts to > describe statistics concerning distribution of tuples. Within this patch, > routine used to load statistics from _sql_stat1 and _sql_stat4 has been > reworked to operate directly on Tarantool's structs. It also includes > codestyle fixes. > > > Nikita Pettik (4): > sql: optimize compilation of SELECT COUNT(*) > sql: add average tuple size calculation > sql: refactor usages of table's tuple count > sql: move SQL statistics to server > > src/box/index_def.c | 92 +++++ > src/box/index_def.h | 90 +++++ > src/box/sql/analyze.c | 787 ++++++++++++++++++++--------------------- > src/box/sql/build.c | 107 ------ > src/box/sql/parse.y | 2 - > src/box/sql/pragma.c | 25 +- > src/box/sql/prepare.c | 7 +- > src/box/sql/select.c | 210 +++++------ > src/box/sql/sqliteInt.h | 123 +++++-- > src/box/sql/vdbe.c | 7 +- > src/box/sql/where.c | 231 ++++++++---- > src/box/sql/whereexpr.c | 4 +- > test/sql-tap/analyze9.test.lua | 81 +++-- > test/sql-tap/eqp.test.lua | 2 +- > 14 files changed, 954 insertions(+), 814 deletions(-) >