Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agBnE-00027b-N8 for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Mar 2016 13:47:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agBnE-0000Yq-4Z for pgsql-hackers@arkaria.postgresql.org; Wed, 16 Mar 2016 13:47:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1agBls-0005lg-0i for pgsql-hackers@postgresql.org; Wed, 16 Mar 2016 13:45:56 +0000 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1agBlo-0003le-74 for pgsql-hackers@postgresql.org; Wed, 16 Mar 2016 13:45:55 +0000 Received: by mail-wm0-x231.google.com with SMTP id p65so190816221wmp.1 for ; Wed, 16 Mar 2016 06:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=svSOO5ih0t/L10VPQkKBcvJD5KOJJvlkcfvJfxPay18=; b=s4N7hXo9CyVRFC1LKNkxMSkcwLQHbToUAFHtcU3eZ4qJ75YDb1pYNO+txPP2U4fNHs d+OJbFXNIx5srZU0HYrrGdHkl8ReJAvqDx2lHZIhHzxSbU98nRyrSgoHPnIyI7VMza/7 eFnf3NpFvQg5enslqf/haTGD3k8qCZtjDDyKj7G3NK6AH8wAepVEZKnlqNLjVIEACD0d 6+cAqwmCTcMGQZVLKPi3Il1AXfgpcf8751qLJMKiX/Cix/Hf2O9OnBzePotrJfxalgf4 ph6V42QZlyEkW5wJGYoJe4Ux18+mCDQtvn+DMADiZCCzdyzTogJJ0owJdigdQSP05AbT 7V8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=svSOO5ih0t/L10VPQkKBcvJD5KOJJvlkcfvJfxPay18=; b=ZDfFAIsbCI2k+Nq9/ZUeuiKt/YyiLizKvP9odTrcRr1n5BgD21PT4uX73Z8sDi535K YaydCuJvaW/iATU9jq9+xdocFXMV6SSj0ARPt8BNbvJIPtsOX3pkzSUzc3G7s/Vz1zAw OvEG0c6ZLyshdHanhgLHowMWptuzjcAU8eV6h1fDtCrv1gAwbzY/m1uISjrihPOKou6a TU8hfpC0dH38+Tm8WYXpVllgbOCqRjGOJDdoeIN1uj7m4AVLuFe1uuTxZb1p+CTbB3Wo mUn15XIKH3yzCqHKL3nVqmZ5wTsALIwWb0Z654d9VRl3sjDns+ebomvZ6Xbs+FksCnIR qwQw== X-Gm-Message-State: AD7BkJIgh/+gjcDRBavP5r9Xy3z8MWRevZTJm70RFOztmCfWEhsEYr9WUIx/aCuOzfJ3MqkAKb2NBDXXQP2hVSwF1Y4/jnqhbyBBDjWSCuvKu1U+8jTr8vDdmxPW6f5VwmSfeAgFzVHUW3eFZl1klCLp/Wu92+myt8VH0tNPkHeEQ4w055MMmv1v6S1Wl+5K7Eh2mNA7p25n X-Received: by 10.194.61.19 with SMTP id l19mr3952014wjr.148.1458135951090; Wed, 16 Mar 2016 06:45:51 -0700 (PDT) Received: from [10.137.2.17] (ip-78-45-216-26.net.upcbroadband.cz. [78.45.216.26]) by smtp.gmail.com with ESMTPSA id j10sm3120216wjb.46.2016.03.16.06.45.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2016 06:45:50 -0700 (PDT) Subject: Re: multivariate statistics v14 To: Tatsuo Ishii References: <1457544102.24545.79.camel@2ndquadrant.com> <1457906378.27231.10.camel@2ndquadrant.com> <20160316.115824.1975980662850012690.t-ishii@sraoss.co.jp> Cc: jeff.janes@gmail.com, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org From: Tomas Vondra Message-ID: <743161cc-771d-6e2b-c43f-4f2bd1fe6d42@2ndquadrant.com> Date: Wed, 16 Mar 2016 14:45:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Thunderbird/46.0a2 MIME-Version: 1.0 In-Reply-To: <20160316.115824.1975980662850012690.t-ishii@sraoss.co.jp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hi, On 03/16/2016 03:58 AM, Tatsuo Ishii wrote: > I apology if it's already discussed. I am new to this patch. > >> Attached is v15 of the patch series, fixing this and also doing quite a >> few additional improvements: >> >> * added some basic examples into the SGML documentation >> >> * addressing the objectaddress omissions, as pointed out by Alvaro >> >> * support for ALTER STATISTICS ... OWNER TO / RENAME / SET SCHEMA >> >> * significant refactoring of MCV and histogram code, particularly >> serialization, deserialization and building >> >> * reworking the functional dependencies to support more complex >> dependencies, with multiple columns as 'conditions' >> >> * the reduction using functional dependencies is also significantly >> simplified (I decided to get rid of computing the transitive closure >> for now - it got too complex after the multi-condition dependencies, >> so I'll leave that for the future > > Do you have any other missing parts in this work? I am asking > because I wonder if you want to push this into 9.6 or rather 9.7. I think the first few parts of the patch series, namely: * shared infrastructure (0002) * functional dependencies (0003) * MCV lists (0004) * histograms (0005) might make it into 9.6. I believe the code for building and storing the different kinds of stats is reasonably solid. What probably needs more thorough review are the changes in clauselist_selectivity(), but the code in these parts is reasonably simple as it only supports using a single multi-variate statistics per relation. The part (0006) that allows using multiple statistics (i.e. selects which of the available stats to use and in what order) is probably the most complex part of the whole patch, and I myself do have some questions about some aspects of it. I don't think this part might get into 9.6 at this point (although it'd be nice if we managed to do that). I can also imagine moving the ndistinct pieces forward, in front of 0006 if that helps getting it into 9.6. There's a bit more work on making it more flexible, though, to allow handling subsets columns (currently we need a perfect match). regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers