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 1iPpaC-0004qV-EK for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Oct 2019 15:08:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iPpaA-0008SD-S3 for pgsql-bugs@arkaria.postgresql.org; Wed, 30 Oct 2019 15:08:22 +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 <9erthalion6@gmail.com>) id 1iPpaA-0008S6-Er for pgsql-bugs@lists.postgresql.org; Wed, 30 Oct 2019 15:08:22 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1iPpa7-0001El-JR for pgsql-bugs@lists.postgresql.org; Wed, 30 Oct 2019 15:08:21 +0000 Received: by mail-wm1-x341.google.com with SMTP id x5so2579705wmi.0 for ; Wed, 30 Oct 2019 08:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BlRY5/pJdpl+XNHbu7dgkCag7MvPPfqHDhDWRPXBcmM=; b=BePddEmIoRoib3k2XXKSMfkSDSxEKM0Z0oCT1Vb/uzDTgNtHtkoqyxHhn2p2Z8iqnE GPO44dAxKjMJDuyoSc++bXbeaapVjElgPBnH5ElljvKHdlAQcuj7R3zaxuC3lB1b6pSG +xGTIJa1Eoiic/r5YwP7ECi2dVoVjNZymvVgvtng9uMaBamHTy6XygCumod7x8BeWQA4 IBklMh2pF2UX4GZme6iIMcI/sOyILnYuJYyorjmlxxVcVe3E+63WivEmxi20fk7fAxDh lwjYtLomyDa9T/jRqoDpJe7cLm1rs29NWUXPRjxVAlrA9UnXAPlJQ2aTgkCIUZfrJPLu kDVA== 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BlRY5/pJdpl+XNHbu7dgkCag7MvPPfqHDhDWRPXBcmM=; b=XWvZ/4nnTCEZsfsPrr1JxScf2gM5rkIgD0C1+Sn6ZWbf2uE9DRNNQ6iGR7SnTPW56C 6s8O5HfFNYBpFRlGbivwiEYWW6jxFeF5/n9c3kXrlIzErWYl4MW4j7nC+MHlveAN3ycT vfxkQSmkVqy2OpF3UqDeyQTMdE14WXoS+ZtHwMA4Tq/1sYRW9FZKrq1uLBBnoLG0SJwp YgNCD+gPt0kecbUYTo6C43rbvr+aQQ7gBr4uY0IDj8ALvPkFYUre+0e/Jd4SQPqzQO95 2xFMlH29pQl7BPtYswKxnevN55kk1QhPkxUsDVUwAwrZtAbTfsAXmZrWbjI8IEhzYmzH txNw== X-Gm-Message-State: APjAAAW1ci5CdWUqqANFk5L6v4RKmzmo56LZotdyvWSlEEYWJ/GrMJAp +Jose/YKshl71gbSGeMZJRE= X-Google-Smtp-Source: APXvYqyG70laNan0tDHzM5tPy+WhXRPEvxXrjzj1xISrdlvlr5JeZ7Xng89zd9hCKZUJhD1J9xm1bA== X-Received: by 2002:a1c:4907:: with SMTP id w7mr9139441wma.62.1572448096816; Wed, 30 Oct 2019 08:08:16 -0700 (PDT) Received: from localhost ([2a02:8109:9ac0:3777:f68c:50ff:fe28:e015]) by smtp.gmail.com with ESMTPSA id b1sm468557wru.83.2019.10.30.08.08.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2019 08:08:16 -0700 (PDT) Date: Wed, 30 Oct 2019 16:10:06 +0100 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Stepan Yankevych Cc: "stepya@ukr.net" , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #16089: Index only scan does not happen but expected Message-ID: <20191030151006.cja5q3hd6fclwuq4@localhost> References: <16089-89312196238e2c78@postgresql.org> <20191030141316.lkzqxc5isoc4xbgz@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Wed, Oct 30, 2019 at 02:18:09PM +0000, Stepan Yankevych wrote: > > >> And in fact at least in my tests this was indeed faster > Can you show execution plan when index is used? > Does it uses Index only scan or index scan and table scan? Yes, at the bottom of the plan there was an Index Only Scan going through l1_snapshot_201811 (although while populating the table I've set values only for not nullable columns).