Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqiLv-0007at-2s for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Aug 2018 17:15:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fqiLp-0007Uk-Lh for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Aug 2018 17:15:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fqiLp-0007UW-6q for pgsql-hackers@lists.postgresql.org; Fri, 17 Aug 2018 17:15:53 +0000 Received: from mail-qt0-f169.google.com ([209.85.216.169]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fqiLl-0002tL-Lf for pgsql-hackers@postgresql.org; Fri, 17 Aug 2018 17:15:51 +0000 Received: by mail-qt0-f169.google.com with SMTP id x7-v6so234038qtk.5 for ; Fri, 17 Aug 2018 10:15:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=riC6LNy+bZOHKWRzDVKMBD7ecSj6mYShON+mZ0WJgqs=; b=AfXm6J+GcWOowZzCHRb9Y8VtLPUG3cVgxBADajj/rXc7djzazMq55BhkvHkirM7NmR icsBblIiGFRGidHi45SVDwEFawFD/29dBESFYx89/3YZhExbUTpf5aoXtADqXTYugNMr rbRyJEsQCIIsTbuH+BcrICop2Fqo/pKUdxTG+sqcnLkx4tQ5DpvEVYm7OR/ejIN8Qqvh J9UpNt0/kna4q95wB/YmOG+/2oa5/xH1JY8hbhHa3KKOTUe6MfNebhBCkfwg6HO0Yv/i TueQpToz9c1CplSfxyFo6g1qTFi9ufk5Pnu7kuDEYtgSzVE7iufQP4EbpD7gGYmsDaUO BaYw== X-Gm-Message-State: AOUpUlFfty5z8GlHzC4a8jIg7rwMe1D6tb3JwPYPnex+Iq9/2/KMfV3b yF1FjUWhcumiL8XVUXPeAG/ORg== X-Google-Smtp-Source: AA+uWPwLPt9wzbHCyHijwYcNkEddlh4JFyNfa2RdMnHbW0kpyL58g2CfwpoDosuS/xNo7/3GQxGr5w== X-Received: by 2002:ac8:f24:: with SMTP id e33-v6mr36229578qtk.301.1534526148169; Fri, 17 Aug 2018 10:15:48 -0700 (PDT) Received: from localhost.localdomain (c-24-61-8-151.hsd1.ma.comcast.net. [24.61.8.151]) by smtp.gmail.com with ESMTPSA id u129-v6sm1436109qkd.45.2018.08.17.10.15.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 10:15:47 -0700 (PDT) Reply-To: jesper.pedersen@redhat.com Subject: Re: Index Skip Scan To: Peter Geoghegan Cc: Thomas Munro , Bhushan Uparkar , pgsql-hackers , Alexander Korotkov References: <707b6f68-16fa-7aa7-96e5-eeb4865e6a30@redhat.com> <89F84E17-D684-4717-B66F-0F05CB00168E@gmail.com> From: Jesper Pedersen Organization: Red Hat Message-ID: <9f2a0339-7d4a-e632-2ad6-237b24a95fa6@redhat.com> Date: Fri, 17 Aug 2018 13:15:46 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Peter, On 08/16/2018 03:48 PM, Peter Geoghegan wrote: > On Wed, Aug 15, 2018 at 11:22 PM, Thomas Munro > wrote: >> * groups and certain aggregates (MIN() and MAX() of suffix index >> columns within each group) >> * index scans where the scan key doesn't include the leading columns >> (but you expect there to be sufficiently few values) >> * merge joins (possibly the trickiest and maybe out of range) > > FWIW, I suspect that we're going to have the biggest problems in the > optimizer. It's not as if ndistinct is in any way reliable. That may > matter more on average than it has with other path types. > Thanks for sharing this; it is very useful to know. Best regards, Jesper