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 1iSUHK-0004Bf-Lm for pgsql-performance@arkaria.postgresql.org; Wed, 06 Nov 2019 22:59:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iSUHJ-0005bw-8z for pgsql-performance@arkaria.postgresql.org; Wed, 06 Nov 2019 22:59:53 +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 1iSUHI-0005bp-TE for pgsql-performance@lists.postgresql.org; Wed, 06 Nov 2019 22:59:53 +0000 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iSUHF-0001N6-MV for pgsql-performance@lists.postgresql.org; Wed, 06 Nov 2019 22:59:52 +0000 Received: by mail-yw1-xc44.google.com with SMTP id q140so4997378ywg.0 for ; Wed, 06 Nov 2019 14:59:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :in-reply-to:user-agent; bh=vZub2n5yji3o63+/6UYf8tScMd9ZbduWNc/S+WunJa4=; b=Z156/2FZYOKTpCcD/GiE45WHwLHu08zs1PlaYvMxx7Nc6QbhZgol9EmdAGjxbx8of+ E7lbQWTrFkgCNTDtpgpyQCPp9va2J36e7aILqe0qSuWsGACtPD1ThUcuJ6gxUsdjCR2O LImpEvPa1XBgujMndauqTQ5GzikCoNW2aU7ErgQMUoBr62KlJnujbgEwreWn6RG0QKdY 5VNz3rH6ydvLLbv6nQAUeOUzAWT/40QPeypIugKs75LU/8chkAmG/hsUjJJZvukHw96G tgAzW8F0Jx6sFkjghqG2I2qSbByNF0KBAGRPeiOG8yzAHmH0/CZ2wa7x5hnk/6Kr05Eh Gyqg== 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:mime-version :content-disposition:in-reply-to:user-agent; bh=vZub2n5yji3o63+/6UYf8tScMd9ZbduWNc/S+WunJa4=; b=jEhoG6UdyjUTcpjhWg/S7AzcKG6eRjEGncUESq5b99wZuxrBxSgDExk/45mPzPN+14 H0q5jqPW7pi3FNTZOcYJl/JMcpn+jOn98pPGTED4iqmLMouz3Fd2WXSVmesYtX1tYTXs seOUCBaJbiiHwe50oXO621TKt4SvENYP5f4/YP10PLRedE5iLAfyJW6dR+yhyJwhIRd/ ze9j+O+r7nnFwHTeO5HCPhqtJM0gz+CEbgFssp/vKJ2BvheiFS456kmZCZp6dh22gBc2 xZRPIdwVu+a9yqIJ8IXDNc4yxvR6UKK6A/wEGsTt2wPaUIfOD65HHgnCq1ML/RFJphv1 So4g== X-Gm-Message-State: APjAAAWfqirz3e7CU0XiENFrAEHBi1GW2DNHWj+lkGNe6pyY7iVx3Nh5 GfwQ7DApmTt7LC/54ExWPgE/pQ== X-Google-Smtp-Source: APXvYqzIATzBIe31vHsw41z/R3KwQL7vIi07C0aDyAaQj5sZHqb5iq5qYfZExBuFGQAhzN8P0BFLQw== X-Received: by 2002:a0d:f2c6:: with SMTP id b189mr21312ywf.186.1573081187338; Wed, 06 Nov 2019 14:59:47 -0800 (PST) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id 138sm201014ywr.46.2019.11.06.14.59.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Nov 2019 14:59:46 -0800 (PST) Received: by pryzbyj (Postfix, from userid 1000) id 6602B80096B; Wed, 6 Nov 2019 16:59:45 -0600 (CST) Date: Wed, 6 Nov 2019 16:59:45 -0600 From: Justin Pryzby To: David Wheeler , Tom Lane Cc: pgsql-performance@lists.postgresql.org, Cameron Redpath Subject: Re: Slow planning, fast execution for particular 3-table query Message-ID: <20191106225945.GE4999@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15855.1572843659@sss.pgh.pa.us> <175BE386-F861-4064-8B5D-93E63BD90F13@dgitsystems.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Nov 04, 2019 at 03:04:45AM +0000, David Wheeler wrote: > Postgres version 9.5.19 > Each of the tables has between 3-4 indexes, and all the indexes include tid as first parameter. On Mon, Nov 04, 2019 at 12:00:59AM -0500, Tom Lane wrote: > If this *is* the cause, v11 and up have a performance improvement that > you need: But note that index definition will be prohibited since: https://www.postgresql.org/docs/9.6/release-9-6.html |Disallow creation of indexes on system columns, except for OID columns (David Rowley) |Such indexes were never considered supported, and would very possibly misbehave since the system might change the system-column fields of a tuple without updating indexes. However, previously there were no error checks to prevent them from being created. Justin