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 1hig7o-0007NC-Ip for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jul 2019 14:20:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hig7n-0002Zw-HG for pgsql-bugs@arkaria.postgresql.org; Wed, 03 Jul 2019 14:20:43 +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 1hifdu-00035o-Jy for pgsql-bugs@lists.postgresql.org; Wed, 03 Jul 2019 13:49:50 +0000 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hifdr-0005tg-VP for pgsql-bugs@lists.postgresql.org; Wed, 03 Jul 2019 13:49:50 +0000 Received: by mail-pg1-x541.google.com with SMTP id u17so804000pgi.6 for ; Wed, 03 Jul 2019 06:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataegret-com.20150623.gappssmtp.com; s=20150623; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-transfer-encoding; bh=dQe1pDxeTIy5UMHFwajcjCa4ggWXgIM7wp5ywujy9MA=; b=jDSiahPiFFYnUP/NkP+375hqDAYTfO3BU09Fz2l4pNHCwEx+HLG0i9axOB+6mYCQyS pK7NUDIZGo0fkmWBkp66Og5d96urQQQix8JCQ1SsoARg7Z5tUg5ctc5/+M93nveGJoPs fh7jpEJ2ZDkn+SZydEDMr6nhjuFZrZn/qTM/a30mnYYWoRgpxkGH3R/y/GK4EuSUXRKE +pOjiVfv6H6Mf+map7LTHBjO8rdby4SsZEgb9aLJb140NpOgVBxaek2Wqcke7RZB+pJk rfPjjCG618qquSEoyAGvkQ8vYKm55YTZQmfwNbAtZtDh9uHvehekcUqlov+NWr/wUukC 1a/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-transfer-encoding; bh=dQe1pDxeTIy5UMHFwajcjCa4ggWXgIM7wp5ywujy9MA=; b=M2jjfQDa1HdaJz8dysrRn7KOypcYJ70We1Cv0XaBRHIJ7aINkws24x/RydtId02W22 01nr5UM8AAaAVi1ZQUTCqFSi25M7ll7Rf+CXrdd2Gi4uxtWl55/QPN794AYP1c4p9G1E dRC6wQsj4eh2mGtIGNq0OBl9+V84Z10p4wC0H2iNC7yOolOcVIakJxlyyEkqu0VImZ5g Cf9GEcKU75iB0S4GVXmurKLWsnB0cQTbqOwLQUW/X/SnTiDwYs7loPWZu86wQHI/Lt5u SNqU4As70gm2ejLfIs23DsLMa7PZKjLfsbUqOyK2bzjJJl/lmcDa6WdU5PNhfCsgW386 gK6Q== X-Gm-Message-State: APjAAAWwzANIG5oNpk+ln3QouDPymUMZIlKbYQ8IJMrenswL4vfYV9/Y KHLizhmnI3UqF5ssiy3W3weBlCKpRoE= X-Google-Smtp-Source: APXvYqxa5PphIIZX7UiyApuhW04Xdpb+4EnIUcNRiPkfOtCfKqmcLChkj/PjAJqGup62XXAk4bIz0w== X-Received: by 2002:a17:90a:2706:: with SMTP id o6mr13245615pje.62.1562161785748; Wed, 03 Jul 2019 06:49:45 -0700 (PDT) Received: from iMac.local ([213.87.121.144]) by smtp.googlemail.com with ESMTPSA id m100sm6221643pje.12.2019.07.03.06.49.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jul 2019 06:49:45 -0700 (PDT) Message-ID: <5D1CB271.6060108@dataegret.com> Date: Wed, 03 Jul 2019 19:49:37 +0600 From: Alexey Ermakov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: David Rowley , PostgreSQL mailing lists Subject: Re: BUG #15890: Planner can't use index "(col) where col is not null" for query "where col in ($1, $2, ... $100+)" References: <15890-d9e1cb33aceb86aa@postgresql.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk great, thank you! -- Alexey Ermakov On 7/3/19 19:01, David Rowley wrote: > On Wed, 3 Jul 2019 at 21:42, PG Bug reporting form > wrote: >> -- 100+ elements, can't use index, using seq scan >> # explain select a from test_not_null_indexes where a in >> Is it possible somehow to pass information that (a) can't be null in such >> cases? > Yes, it is possible, however, this is not a bug in v11. It's something > that has been improved in v12, which will be released later this year. > > See: https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=65ce07e020 > > v11 won't receive the same improvement. >