Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGjmM-0008Dj-GG for pgsql-performance@arkaria.postgresql.org; Mon, 01 Mar 2021 14:44:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lGjmL-0004mi-DQ for pgsql-performance@arkaria.postgresql.org; Mon, 01 Mar 2021 14:44:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGjmL-0004ma-5S for pgsql-performance@lists.postgresql.org; Mon, 01 Mar 2021 14:44:09 +0000 Received: from mout.gmx.net ([212.227.15.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lGjmI-0003ZO-TA for pgsql-performance@lists.postgresql.org; Mon, 01 Mar 2021 14:44:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1614609843; bh=pfa0RrQI09+h7KDFWxI75qnvsDi7QZQc0t7vwrBaMzc=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=bMeKIhen+rAAZPKzEBWVZfc+44uytqX50sOjaa3NPQ6ISJXYFzFFrRpPFmNews4jS BIJz7ojVQUGT6CJoIdzyMoyjGIDUJTnXNoP0/e+EOoxO9caEQqSP4QJpNb+MFTFHHJ GU9X4PPHpH/2o4RabuiTseDbuVxjVkGXB846H0sQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [10.1.35.136] ([185.40.248.10]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MhU5R-1lmCq82BEJ-00ef5n for ; Mon, 01 Mar 2021 15:44:03 +0100 Subject: Re: Potential performance issues To: pgsql-performance@lists.postgresql.org References: From: Thomas Kellerer Message-ID: <5fcce4e3-3ee7-e516-91a6-1883def57de8@gmx.net> Date: Mon, 1 Mar 2021 15:44:02 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:83KHKU2TEfxHYywneTFi8U7aQsFh17/Toy8lxToDcZikWENUjSH IGmdTAKyY9WzfaeDlDOUb4LCUT8EPq0lt1KKK0W8YAkydRHseQRA0Sz9zDk7YPT2k4mHyD4 9jN708p/hnkAgpIAz0aRqmePip7rG+ZTwZ0bbvHJ+tgumSIpXt0GqJGq9oI187BNHcpEkM1 az0ZLS0c4s+2YIosz1T9g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:+Hy4pwRYujw=:79KcZ8oW3lradGfHYzUwtw nKlZRGPFG55/ciKDn4fkMCx0eQAPNz8Cg82gVc5IEzY+6xCHeSB7wCC3sDAaGlzVDoagMo7/t 3bolHT4hogS7ZQYd/AzrObAQZaU5KodDCBT3kGbIbRzLxR0l4aIPnVF3n2yG3rAxlqeDJluew wXoLNfVN8U45OVyAtNMzao5GwyFnvmeusDZnI4vwhze5JHi9V5qdWMn/jOY58MlaGE9//jUjJ O63YKviCiqim3/DhXZlEjYlwBNGU1Wi609lE8ZJvZfQfIeIPlqQSD27fWumqJ6BNfZecUFUmg XYLRrdZ8srvk0eW6/dgWHNbkfI2XtDXrUtfKud1BH7TC0vQYUS1bFTrIENA3W1Oys1AERLQOy hiq3qKXlTMweIb17FfOdGX9jlX5iBQ7xgfu4PnLI+KMLZpz5EcZSvlaQlKSJLxOV/wowM32X0 gVLv1CK5ALrvfDB/iibppuZpmMd6ZwaHOX3/HGyr9gSJLJhIiPdmkhWrmxPlSX66L8P3atXL7 vbw+PMwoCcf6ZdW3IB4Eu4bq9aFKIxfhA1s27rfyWl7Fu5/IyPpZuIR2w6sBd+gmk3BfOtiPi Mx6QIid6lAj6lmIp2H7uMxefQ0KizOa+vpu9tjR/2Y7cfcR9+tv3g55PNw+g7kqrDRp4qcw5l hecykNroEZdyiW98YG4ISJHR5dqlZsHYp/fuzrH9KK9/gL6at94uTcJ7Kcd+eCkRcOwk3dDKB M4u3XH6PalfHktFs6tZ805lH6WulSbtfm/cT+A0gJdjWIGRL7e7KV+ylw8Oos19qzi1+bCTJG Db0aqqrjgwB/3aiMy8rK/0s03dZzw7+EzA9FJthxxp9bWPH50G1mKnWgAxk+t3Jc+uVQWbi7x WDIbGXSfgE4ucnuL3jTQ== List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jung, Jinho schrieb am 28.02.2021 um 16:04: > # Performance issues discovered from differential test > > For example, the below query runs x1000 slower than other DBMSs from Pos= tgreSQL. > > =C2=A0 =C2=A0 select ref_0.ol_amount as c0 > =C2=A0 =C2=A0 from order_line as ref_0 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 left join stock as ref_1 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 on (ref_0.ol_o_id =3D ref_1.s_w_id ) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 inner join warehouse as ref_2 > =C2=A0 =C2=A0 =C2=A0 =C2=A0 on (ref_1.s_dist_09 is NULL) > =C2=A0 =C2=A0 where ref_2.w_tax is NULL; I find this query extremely weird to be honest. There is no join condition between warehouse and the other two tables whic= h results in a cross join. Which is "reduced" somehow by applying the IS NULL conditions - but still,= to me this makes no sense. Maybe the Postgres optimizer doesn't handle this ugly "join condition" the= same way the others do. I would rather expect a NOT EXISTS against the warehouse table. Thomas