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 1hkGrd-0002ep-IF for pgsql-general@arkaria.postgresql.org; Sun, 07 Jul 2019 23:46:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hkGrb-0005TZ-Vs for pgsql-general@arkaria.postgresql.org; Sun, 07 Jul 2019 23:46:35 +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 1hkGrb-0005Ox-JH for pgsql-general@lists.postgresql.org; Sun, 07 Jul 2019 23:46:35 +0000 Received: from mail-io1-xd29.google.com ([2607:f8b0:4864:20::d29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hkGrY-0001HD-JQ for pgsql-general@lists.postgresql.org; Sun, 07 Jul 2019 23:46:34 +0000 Received: by mail-io1-xd29.google.com with SMTP id i10so30970432iol.13 for ; Sun, 07 Jul 2019 16:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8mgkUTfSEfQJQwegdP0BVSXFnTaMDuIGNX43RblJWcM=; b=OPMMAcyKsN/OgA/Z15tAfpJPV8Fe767E9GxYB7fgN1pQGUfxmHRHJ8eRJJvsfB8ss/ NVFbNZKDxmeURmrBr3RiDjunrboxrldGkB1c1sNb9FEmsBYq4qYBYuB3FW3qAapoK5Fn O4Np4NSIy7Y5HmsA2M54+j5CRVb3ODZfMHDD2uH1/W6Od+Z697D1unjrcRbisS9d/zst PunVGyKv/ezGXVgTwiG7Hj50vPZJMEABJAtrXklhMfK/mKbf/3wzELtmi6w39R87Wna5 3w4PBX4f4/gu9/nOuMMSdHjqv2I/6XXbaLj89mtsRW5wf7eEssyr9hxnDI13QCC4HHc6 q6/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8mgkUTfSEfQJQwegdP0BVSXFnTaMDuIGNX43RblJWcM=; b=TEf113Yvs0LsOZI7iHcCk/51/HXRGCBFF+jWXdBqbUNFrNq9s7P2S4wCo5vwYwo1b9 9Sf4ZvqTufPIwV8yVvJrlnCgoMlJZvbEBs53p+ka3AZQ6x6dN37tSk67s/4ubrspMA0r gvqucxvF3uRPZAqiLhxNnz1zXy+vx2Nz6G4+BhouuxaJ1kXkCKiHZL3rwGazwEe5d7sa eXp7HjbN2Re2Avc7cplvh8oaRiYRO/pkqgR4TjUqjLF/GVdaC5w/QGV9z4EV4ezNqYFE kYHdXwhs4qSjvW7+v6DU3TmFLFFf9UhGcrCDBvuMNr5RM4SBcCsTyyYL5aGEmFrygcBt p/ZQ== X-Gm-Message-State: APjAAAXlucXEJpQxv6qqofex6bVw12yWYEcDR4wKSIHFhD5V6C83fIVr Iq4sR97cc3iyLz6uPLHsw24= X-Google-Smtp-Source: APXvYqxP9/0wNIr3rroUXd1mjspmWTkxB2vK6SJ8FDN7OFV20xqtvYVZ1WOB7g0cLZzWZl4TB5CXFA== X-Received: by 2002:a02:c90d:: with SMTP id t13mr17241574jao.62.1562543190355; Sun, 07 Jul 2019 16:46:30 -0700 (PDT) Received: from [192.168.1.108] (c-73-63-59-118.hsd1.ut.comcast.net. [73.63.59.118]) by smtp.gmail.com with ESMTPSA id m20sm6979817ioh.4.2019.07.07.16.46.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jul 2019 16:46:29 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Measuring the Query Optimizer Effect: Turning off the QO? From: Rob Sargent In-Reply-To: Date: Sun, 7 Jul 2019 17:46:28 -0600 Cc: "pgsql-general@lists.postgresql.org" Content-Transfer-Encoding: 7bit Message-Id: <6E1859C3-4453-4AC2-ABE9-C4F40E5CCDC0@gmail.com> References: To: Tom Mercha X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jul 7, 2019, at 5:22 PM, Tom Mercha wrote: > > Hi All > > As we know, a query goes through number of stages before it is executed. > One of these stages is query optimization (QO). > > There are various parameters to try and influence optimizer decisions > and costs. But I wanted to measure the effect of such a stage by turning > it off completely and I can't find such a parameter which explicitly > does that. Then I could execute a query to get the effect of "QO active > and "QO inactive" and compare. > > Obviously, I know well what the results would generally look like but I > am just interested in measuring the differences for various types of > queries. I am also aware that this is a simple comparison - there are > more interesting comparisons to perform with QO tweaks, but right now I > am interested in something basic. > > So how would one shut down QO? Or at least, obtaining the guarantee of > generating the worst plan possible, ideally without touching many > parameters? > > Best, > Tom Drop all indices?