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 655F8205F1 for ; Tue, 23 Oct 2018 03:35:59 -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 F3AV5eua7Wdb for ; Tue, 23 Oct 2018 03:35:59 -0400 (EDT) Received: from smtp46.i.mail.ru (smtp46.i.mail.ru [94.100.177.106]) (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 0070C2048C for ; Tue, 23 Oct 2018 03:35:58 -0400 (EDT) Received: by smtp46.i.mail.ru with esmtpa (envelope-from ) id 1gErEL-0003xQ-4f for tarantool-patches@freelists.org; Tue, 23 Oct 2018 10:35:57 +0300 Date: Tue, 23 Oct 2018 10:35:56 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 1/8] vinyl: move update optimization from write iterator to tx Message-ID: <20181023073556.GF9849@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: tarantool-patches@freelists.org * Vladimir Davydov [18/10/15 10:15]: > An UPDATE operation is written as DELETE + REPLACE to secondary indexes. > We write those statements to the memory level even if the UPDATE doesn't > actually update columns indexed by a secondary key. We filter them out > in the write iterator when the memory level is dumped. That's what we > use vy_stmt_column_mask for. > > Actually, there's no point to keep those statements until dump - we > could as well filter them out when the transaction is committed. This > would even save some memory. This wouldn't hurt read operations, because > point lookup doesn't work for secondary indexes by design and so we have > to read all sources, including disk, on every read from a secondary > index. > > That said, let's move update optimization from the write iterator to > vy_tx_commit. This is a step towards removing vy_stmt_column_mask. OK to push. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov