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 1iTXQ4-0002d8-Hl for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Nov 2019 20:33:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iTXQ3-0004F9-2R for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Nov 2019 20:33:15 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iTXQ2-0004Ez-Mt for pgsql-hackers@lists.postgresql.org; Sat, 09 Nov 2019 20:33:14 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iTXPz-0004qm-I8 for pgsql-hackers@postgresql.org; Sat, 09 Nov 2019 20:33:13 +0000 Received: by mail-pg1-x542.google.com with SMTP id 15so6382800pgt.7 for ; Sat, 09 Nov 2019 12:33:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=LP/9e6PVTD01H5GszgBCadK4LA8A3TOR3hSNqVMUifM=; b=AHlZy04RbVC646tar6imzpCWrIam2F3W9la/+FAwXdMPgiqj5SBXw1f/UVfxoV3/ns Q6/haEkNOHKO4aKBojrs9vcJPN2Ne7/CXBF0N9xijDJWPOPk8PXy1eW32OPGN9gi2pTu eChkhV8VKapSodEVxp0KXxX34i6yoTJgYKy9BnDSiF7vrn2Ma48kfL4n+BHglahUANHB IXJmsUoMpNwcpq5tyzBx4l0MudUHH2QTxAf9mDic7z6yspf5NFDSTQbtKK2cPvBIDyTR FqeRs06utYwS3/Tw5GnTvQqdNoAO6Y4bXeRxXJArF2OsdWLJ9NCJFPFrkACgiy0a7eF3 3AuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=LP/9e6PVTD01H5GszgBCadK4LA8A3TOR3hSNqVMUifM=; b=Ehm1Geala6H4eF3EP9IEV3sM3n5Loz8Eof7wTF9s9Wa/ZBS3clhEtAuuI1+tMxBC5S eHHmFpmi51vZGbWmJpeN8PnzDmNVO3FZiq26pcdPPdU5Ro+WhzpTxZCMejQdSKdnqlom 68Hw2K1uIgNzw3iNiww8yg3zruAmGv7/lnOiBtnAizvDAF51dxDgRwZFtQaCpRsIPyoG wr0bNNcv58u6XZV5nzGu+2BsgISW7CQXX47sC53QtPDFrmxMD+hiL8xbmonXlxChIgPB fZ6pPMwN+tnm5RbY9ityGBe4QeRbhNz8HjqwThYB/NjnF02DEhkI9ElbMuFHIUuczeBy KcVQ== X-Gm-Message-State: APjAAAX3IpoRf3DIZwG2T1oUYBzD+vnu7p8PF9eHfMumLtufct9D1NwZ 0jlsJj1URWMiSTKay/I5+Jf3vGuO X-Google-Smtp-Source: APXvYqy6bzuVdluG/R4W6GbShnNW3InRViceJuWrf4XSXHWm4DUoMVvZwhoL9UugpCWkhNJXFrIlNg== X-Received: by 2002:a63:ed43:: with SMTP id m3mr19757343pgk.261.1573331587834; Sat, 09 Nov 2019 12:33:07 -0800 (PST) Received: from [192.168.0.17] (24-113-193-150.wavecable.com. [24.113.193.150]) by smtp.gmail.com with ESMTPSA id e24sm9983287pjt.18.2019.11.09.12.33.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 09 Nov 2019 12:33:06 -0800 (PST) Subject: Re: Using multiple extended statistics for estimates To: Tomas Vondra , PostgreSQL Hackers References: <20191028152048.jc6pqv5hb7j77ocp@development> <20191106195440.wtxsyhiwdidl37hv@development> <20191106195849.odhhc66xd23hw6hf@development> From: Mark Dilger Message-ID: <97932e1d-53f1-bad3-efc2-1d98cab70727@gmail.com> Date: Sat, 9 Nov 2019 12:33:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: <20191106195849.odhhc66xd23hw6hf@development> Content-Type: multipart/mixed; boundary="------------A93CAA5E1E0CC4D754072ABA" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------A93CAA5E1E0CC4D754072ABA Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit On 11/6/19 11:58 AM, Tomas Vondra wrote: > On Wed, Nov 06, 2019 at 08:54:40PM +0100, Tomas Vondra wrote: >> On Mon, Oct 28, 2019 at 04:20:48PM +0100, Tomas Vondra wrote: >>> Hi, >>> >>> PostgreSQL 10 introduced extended statistics, allowing us to consider >>> correlation between columns to improve estimates, and PostgreSQL 12 >>> added support for MCV statistics. But we still had the limitation that >>> we only allowed using a single extended statistics per relation, i.e. >>> given a table with two extended stats >>> >>>  CREATE TABLE t (a int, b int, c int, d int); >>>  CREATE STATISTICS s1 (mcv) ON a, b FROM t; >>>  CREATE STATISTICS s2 (mcv) ON c, d FROM t; >>> >>> and a query >>> >>>  SELECT * FROM t WHERE a = 1 AND b = 1 AND c = 1 AND d = 1; >>> >>> we only ever used one of the statistics (and we considered them in a not >>> particularly well determined order). >>> >>> This patch addresses this by using as many extended stats as possible, >>> by adding a loop to statext_mcv_clauselist_selectivity(). In each step >>> we pick the "best" applicable statistics (in the sense of covering the >>> most attributes) and factor it into the oveall estimate. Tomas, Your patch compiles and passes the regression tests for me on debian linux under master. Since your patch does not include modified regression tests, I wrote a test that I expected to improve under this new code, but running it both before and after applying your patch, there is no change. Please find the modified test attached. Am I wrong to expect some change in this test's output? If so, can you provide a test example that works differently under your patch? Thanks! -- Mark Dilger --------------A93CAA5E1E0CC4D754072ABA Content-Type: text/plain; charset=UTF-8; name="stats-ext-test.patch.1" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="stats-ext-test.patch.1" diff --git a/src/test/regress/expected/stats_ext.out b/src/test/regress/expected/stats_ext.out index b65228fa07..8e20df25fc 100644 --- a/src/test/regress/expected/stats_ext.out +++ b/src/test/regress/expected/stats_ext.out @@ -353,6 +353,298 @@ SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM ndistinct GROUP BY a, d 500 | 50 (1 row) +-- muliple extended statistics +CREATE TABLE multistats ( + i2 INTEGER, + i3 INTEGER, + i17 INTEGER, + i19 INTEGER, + i34 INTEGER, + i38 INTEGER, + i51 INTEGER, + i57 INTEGER +); +INSERT INTO multistats (i2, i3, i17, i19, i34, i38, i51, i57) + SELECT i % 2, i % 3, i % 17, i % 19, i % 34, i % 38, i % 51, i % 57 + FROM generate_series(1, 500000) s(i); +-- estimates without mcv statistics +ANALYZE multistats; +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i34'); + estimated | actual +-----------+-------- + 68 | 34 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i38'); + estimated | actual +-----------+-------- + 76 | 38 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i34'); + estimated | actual +-----------+-------- + 578 | 34 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i38'); + estimated | actual +-----------+-------- + 722 | 38 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i34, i38'); + estimated | actual +-----------+-------- + 50000 | 646 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i51'); + estimated | actual +-----------+-------- + 153 | 51 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i57'); + estimated | actual +-----------+-------- + 171 | 57 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i51'); + estimated | actual +-----------+-------- + 867 | 51 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i57'); + estimated | actual +-----------+-------- + 1083 | 57 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i51, i57'); + estimated | actual +-----------+-------- + 50000 | 969 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i34'); + estimated | actual +-----------+-------- + 2500 | 29411 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i38'); + estimated | actual +-----------+-------- + 2500 | 26315 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34'); + estimated | actual +-----------+-------- + 2500 | 250001 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i38'); + estimated | actual +-----------+-------- + 2500 | 250001 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 AND i19 = i38'); + estimated | actual +-----------+-------- + 12 | 125387 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 OR i19 = i38'); + estimated | actual +-----------+-------- + 4988 | 374615 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i51'); + estimated | actual +-----------+-------- + 2500 | 29411 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i57'); + estimated | actual +-----------+-------- + 2500 | 26315 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51'); + estimated | actual +-----------+-------- + 2500 | 166667 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i57'); + estimated | actual +-----------+-------- + 2500 | 166667 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 AND i19 = i57'); + estimated | actual +-----------+-------- + 12 | 55727 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 OR i19 = i57'); + estimated | actual +-----------+-------- + 4988 | 277607 +(1 row) + +-- create mcv statistics over pairs of strongly correlated columns +CREATE STATISTICS ms_2_34 (mcv) ON i2, i34 FROM multistats; +CREATE STATISTICS ms_2_38 (mcv) ON i2, i38 FROM multistats; +CREATE STATISTICS ms_3_51 (mcv) ON i3, i51 FROM multistats; +CREATE STATISTICS ms_3_57 (mcv) ON i3, i57 FROM multistats; +CREATE STATISTICS ms_17_34 (mcv) ON i17, i34 FROM multistats; +CREATE STATISTICS ms_17_51 (mcv) ON i17, i51 FROM multistats; +CREATE STATISTICS ms_19_38 (mcv) ON i19, i38 FROM multistats; +CREATE STATISTICS ms_19_57 (mcv) ON i19, i57 FROM multistats; +-- estimates with multiple strongly correlated pairs of mcv statistics to choose from +ANALYZE multistats; +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i34'); + estimated | actual +-----------+-------- + 68 | 34 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i38'); + estimated | actual +-----------+-------- + 76 | 38 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i34'); + estimated | actual +-----------+-------- + 578 | 34 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i38'); + estimated | actual +-----------+-------- + 722 | 38 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i34, i38'); + estimated | actual +-----------+-------- + 50000 | 646 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i51'); + estimated | actual +-----------+-------- + 153 | 51 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i57'); + estimated | actual +-----------+-------- + 171 | 57 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i51'); + estimated | actual +-----------+-------- + 867 | 51 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i57'); + estimated | actual +-----------+-------- + 1083 | 57 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i51, i57'); + estimated | actual +-----------+-------- + 50000 | 969 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i34'); + estimated | actual +-----------+-------- + 2500 | 29411 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i38'); + estimated | actual +-----------+-------- + 2500 | 26315 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34'); + estimated | actual +-----------+-------- + 2500 | 250001 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i38'); + estimated | actual +-----------+-------- + 2500 | 250001 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 AND i19 = i38'); + estimated | actual +-----------+-------- + 12 | 125387 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 OR i19 = i38'); + estimated | actual +-----------+-------- + 4988 | 374615 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i51'); + estimated | actual +-----------+-------- + 2500 | 29411 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i57'); + estimated | actual +-----------+-------- + 2500 | 26315 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51'); + estimated | actual +-----------+-------- + 2500 | 166667 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i57'); + estimated | actual +-----------+-------- + 2500 | 166667 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 AND i19 = i57'); + estimated | actual +-----------+-------- + 12 | 55727 +(1 row) + +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 OR i19 = i57'); + estimated | actual +-----------+-------- + 4988 | 277607 +(1 row) + +DROP TABLE multistats; -- functional dependencies tests CREATE TABLE functional_dependencies ( filler1 TEXT, diff --git a/src/test/regress/sql/stats_ext.sql b/src/test/regress/sql/stats_ext.sql index 040ee97a1e..7eee03513a 100644 --- a/src/test/regress/sql/stats_ext.sql +++ b/src/test/regress/sql/stats_ext.sql @@ -224,6 +224,84 @@ SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM ndistinct GROUP BY b, c SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM ndistinct GROUP BY a, d'); +-- muliple extended statistics +CREATE TABLE multistats ( + i2 INTEGER, + i3 INTEGER, + i17 INTEGER, + i19 INTEGER, + i34 INTEGER, + i38 INTEGER, + i51 INTEGER, + i57 INTEGER +); + +INSERT INTO multistats (i2, i3, i17, i19, i34, i38, i51, i57) + SELECT i % 2, i % 3, i % 17, i % 19, i % 34, i % 38, i % 51, i % 57 + FROM generate_series(1, 500000) s(i); + +-- estimates without mcv statistics +ANALYZE multistats; +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i34'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i38'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i34'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i38'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i34, i38'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i51'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i57'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i51'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i57'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i51, i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i34'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 AND i19 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 OR i19 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i51'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 AND i19 = i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 OR i19 = i57'); + +-- create mcv statistics over pairs of strongly correlated columns +CREATE STATISTICS ms_2_34 (mcv) ON i2, i34 FROM multistats; +CREATE STATISTICS ms_2_38 (mcv) ON i2, i38 FROM multistats; +CREATE STATISTICS ms_3_51 (mcv) ON i3, i51 FROM multistats; +CREATE STATISTICS ms_3_57 (mcv) ON i3, i57 FROM multistats; +CREATE STATISTICS ms_17_34 (mcv) ON i17, i34 FROM multistats; +CREATE STATISTICS ms_17_51 (mcv) ON i17, i51 FROM multistats; +CREATE STATISTICS ms_19_38 (mcv) ON i19, i38 FROM multistats; +CREATE STATISTICS ms_19_57 (mcv) ON i19, i57 FROM multistats; + +-- estimates with multiple strongly correlated pairs of mcv statistics to choose from +ANALYZE multistats; +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i34'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i2, i38'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i34'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i38'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i34, i38'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i51'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i3, i57'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i51'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i19, i57'); +SELECT * FROM check_estimated_rows('SELECT COUNT(*) FROM multistats GROUP BY i17, i19, i51, i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i34'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i2 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 AND i19 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i34 OR i19 = i38'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i51'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i3 = i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i19 = i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 AND i19 = i57'); +SELECT * FROM check_estimated_rows('SELECT * FROM multistats WHERE i17 = i51 OR i19 = i57'); + +DROP TABLE multistats; + -- functional dependencies tests CREATE TABLE functional_dependencies ( filler1 TEXT, --------------A93CAA5E1E0CC4D754072ABA--