Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbzzS-0035XM-6I for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Aug 2024 10:03:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sbzzQ-00DA1J-O6 for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Aug 2024 10:03:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sbzzQ-00DA1A-EE for pgsql-hackers@lists.postgresql.org; Thu, 08 Aug 2024 10:03:24 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sbzzN-003go4-Ng for pgsql-hackers@postgresql.org; Thu, 08 Aug 2024 10:03:23 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2ef2d96164aso7415951fa.3 for ; Thu, 08 Aug 2024 03:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723111400; x=1723716200; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=oChtGhFkNmShj0hZFLWEyshxZezFfCy3WUuWjqsM99M=; b=h77HB+RD0QeID2edvQEmCnYIAye3Phd54PviiIAIBFuXuPSrdugQjHwBUAsSHW8S1L vA+XhWH3kdkRgnU+FPv1sJeGCoLvhCiXQk5vfECag3BjTtBeBQZZfHA5ICtK/rfOvmhN SpgG+QoOSn++QelvygSTyeVhXSs1OMeJqq8mVDsxWUrW0vkuX/qZo1sgkR2dB7b59DZg JYJazWCmgC0tQDDvomsANhxHCT+TzxoadnprG5Q9jNYW0Dy/Zjh4xS64jhxMMZu8czRM DVlm1fCTOSc+DMupSrxDbg5f1DlZRQ9aI8Izef6wNs0uYEQsqweFQB18r8R1B3WRQlWZ ib0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723111400; x=1723716200; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oChtGhFkNmShj0hZFLWEyshxZezFfCy3WUuWjqsM99M=; b=WN5SQil/Tm3+bvDGebZ89dAb86Y6OvgAmlVJGeHpamSceGA9txEjgWIeBSGJmCcKvr wjmQhY16wnUPrU1H0STCCRzaxV/HhHgi9Is0j6ssnzHdWi0K2uqpQK1q/a0AitRo6eIq fZ/nq8feNlNNtjq8Kyq5i3aAuj++sQYEuMZVrvZuxcoXooSNLeUSCVujCpBrjzuiV6lq mwiaW3MDUzPdph+wKdYvYuwLNSc9aAWAmTQ14Dh4/sG2S/e64yl0IIWHxMT12p1d3Bby LtSTtJUGFBBqQSRM79UP5hzVwEgKk5PRpwMYtUgSE2nudUwNaaGmHovxUU3FifICNkkZ gXwg== X-Gm-Message-State: AOJu0Yz3rBzAwnPWIhrEjBVaYvQX31zu0yuR/pFCvW3LOr15eABIqJLv gy0J5LWE8QS5/20e5PEFJpshy5kWrvSKWQRtIk2FwaetQvWcV1WWcre7vY3NbV3+i8L/5mVbjER NJ32C+9AthmEpnV2hYsScJeZqA0c= X-Google-Smtp-Source: AGHT+IEbOlBC4R+Qx6Fr94qqWVImj41Bjr/rZwtMIMQ0GVDPfKkgFHQTI1lhQaxnANTvuO+C5PWYaPdaxM0RCJlu+j4= X-Received: by 2002:a2e:b384:0:b0:2ef:2f17:9ede with SMTP id 38308e7fff4ca-2f19de8601fmr9200691fa.49.1723111399527; Thu, 08 Aug 2024 03:03:19 -0700 (PDT) MIME-Version: 1.0 References: <20230601235909.0e1572c27e59112f9d0cbe86@sraoss.co.jp> In-Reply-To: <20230601235909.0e1572c27e59112f9d0cbe86@sraoss.co.jp> From: Kirill Reshke Date: Thu, 8 Aug 2024 15:03:08 +0500 Message-ID: Subject: Re: Incremental View Maintenance, take 2 To: Yugo NAGATA Cc: pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 31 May 2023 at 20:14, Yugo NAGATA wrote: > > Hello hackers, > > Here's a rebased version of the patch-set adding Incremental View > Maintenance support for PostgreSQL. That was discussed in [1]. > > The patch-set consists of the following eleven patches. > > - 0001: Add a syntax to create Incrementally Maintainable Materialized Views > - 0002: Add relisivm column to pg_class system catalog > - 0003: Allow to prolong life span of transition tables until transaction end > - 0004: Add Incremental View Maintenance support to pg_dum > - 0005: Add Incremental View Maintenance support to psql > - 0006: Add Incremental View Maintenance support > - 0007: Add DISTINCT support for IVM > - 0008: Add aggregates support in IVM > - 0009: Add support for min/max aggregates for IVM > - 0010: regression tests > - 0011: documentation > > [1] https://www.postgresql.org/message-id/flat/20181227215726.4d166b4874f8983a641123f5%40sraoss.co.jp > > > Regards, > Yugo Nagata > > -- > Yugo NAGATA Actually, this new MV delta-table calculation can be used to make faster REFRESH MATERIALIZED VIEW even for non-IMMV. Specifically, we can use our cost-based Optimizer to decide which way is cheaper: regular query execution, or delta-table approach (if it is applicable). Is it worth another thread? -- Best regards, Kirill Reshke