Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdLk2-0005wd-GP for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jun 2019 21:34:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hdLjy-0007zI-Ug for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Jun 2019 21:34:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdLjy-0007z4-IU for pgsql-hackers@lists.postgresql.org; Tue, 18 Jun 2019 21:34:06 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdLju-0000bt-Uc for pgsql-hackers@lists.postgresql.org; Tue, 18 Jun 2019 21:34:05 +0000 Received: by mail-wr1-x434.google.com with SMTP id n9so1108172wru.0 for ; Tue, 18 Jun 2019 14:34:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=nbLm71X6TzLK0a83e5piIJjGhzU8l3PzUUeGnVx+xJk=; b=bZrMI+aUqkHQkSMZ9ooQfiwriMQ7ulqJOo54TM32FtFYfYgK2vIhcYMI2PaReo5j/v A3DcmC7P6smorQah/ZBjGyT3CEE3HB4ldkYfSKLqL75UgmckIqsVkjKbTJHfQ30Jp+UZ 30K04IqEKScff4F9W0zq6gdGymLfwOjeDhHjDPd4tzu4TzqHMeBMkLYvS6dIe27jtEfx nrwM7D6AcfSrscUKNWHD5TyK/PHHW0txj9TeLOunj53paFM7HNds/fM01T3HKjPO33Jk gAzZW/Od7eL8eWfzvACJXReN5YVEiG77g0/AiS8tdKY/OE8PFcLCkZt8v05jS9UjIBTe btbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=nbLm71X6TzLK0a83e5piIJjGhzU8l3PzUUeGnVx+xJk=; b=bHwh6Ubh9y+sHaMEfOTqZHlFuGmn7hGsjWM760zoVjFXMRAcK1TnUT+ZO8RvTqm/QM jn1/8HvJAmA0e+tjLYUMCKyu/iNI0yCs/CDoQ7CnhaZXOu2Wz//DDvN/lNnVysDDot3r AYQ34VWI/eAPii6vHEqyuuZvOutUNayrlGM0UGsQYDyid4pkZlvoBAh5FJgKNwKvZ2jc MkKEn9/s1vol/SCKrcA1SE60CrbBgNsZrzUHrOHgDmXSxSFUYrX2nxXkON9SjvBJsQdw n/uahceRqua8Mb9dlVjWpjhoKP8SlkUHLcTKX20WN3vrhuw16GLwdn3ItbJuJp7QEZKg nKlw== X-Gm-Message-State: APjAAAWWqp9FM9SWvwW2w/Fp//jd2fMcsV0vikkqoOh2oWrY5bXtx9lW HtTgOSmvSmSxpO0ntJhd5fJ1gu5UknuBPMaJYw9E3eqQrdTTmJSnzg/2zPy5kCWvo5TunwtWBwL zGAgaT5PIG6hv5ttezRxLTw+8dPG5gsyR+AM9X7o0LSNS5ZqnKW7EojdDWWTyyA7sSbcT+uJJWP A5Obb3ZY3PhCQIMMnG3yo= X-Google-Smtp-Source: APXvYqx2Qm9dpoV0C/NKQxLoj3yfxp/A7sM3jsxz1SlxRlyWlTYIBXez1f2HwwQnkh5N4HTXLaRpFQ== X-Received: by 2002:a5d:4708:: with SMTP id y8mr18231277wrq.85.1560893641025; Tue, 18 Jun 2019 14:34:01 -0700 (PDT) Received: from localhost (ip-86-49-243-43.net.upcbroadband.cz. [86.49.243.43]) by smtp.gmail.com with ESMTPSA id j32sm6564347wrj.43.2019.06.18.14.33.58 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 18 Jun 2019 14:33:58 -0700 (PDT) Date: Tue, 18 Jun 2019 23:33:57 +0200 From: Tomas Vondra To: PostgreSQL Hackers Subject: Multivariate MCV list vs. statistics target Message-ID: <20190618213357.vli3i23vpkset2xd@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, One slightly inconvenient thing I realized while playing with the address data set is that it's somewhat difficult to set the desired size of the multi-column MCV list. At the moment, we simply use the maximum statistic target for attributes the MCV list is built on. But that does not allow keeping default size for per-column stats, and only increase size of multi-column MCV lists. So I'm thinking we should allow tweaking the statistics for extended stats, and serialize it in the pg_statistic_ext catalog. Any opinions why that would be a bad idea? I suppose it should be part of the CREATE STATISTICS command, but I'm not sure what'd be the best syntax. We might also have something more similar to ALTER COLUMNT, but perhaps ALTER STATISTICS s SET STATISTICS 1000; looks a bit too weird. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services