Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tbq9K-0005C2-9S for pgsql-performance@postgresql.org; Fri, 23 Nov 2012 10:06:18 +0000 Received: from moutng.kundenserver.de ([212.227.17.10]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tbq9I-0006EA-P6 for pgsql-performance@postgresql.org; Fri, 23 Nov 2012 10:06:17 +0000 Received: from obelix.localnet (AToulouse-556-1-231-184.w83-193.abo.wanadoo.fr [83.193.7.184]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Lm6OP-1T2VOO1YjR-00ZJdh; Fri, 23 Nov 2012 11:05:58 +0100 From: =?iso-8859-15?q?C=E9dric_Villemain?= Reply-To: cedric@2ndquadrant.com Organization: 2ndQuadrant To: pgsql-performance@postgresql.org Subject: Re: Hints (was Poor performance using CTE) Date: Fri, 23 Nov 2012 11:05:52 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) Cc: Craig James , Kevin Grittner , Craig Ringer , Tom Lane , Claudio Freire , Merlin Moncure , David Greco References: <20121121134232.68590@gmx.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2553040.f2ebKuQQ84"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201211231105.56380.cedric@2ndquadrant.com> X-Provags-ID: V02:K0:P1dCy9GgCXkyef5fCM2V3lmiNq1/4o3dY707s8br0R4 48Hun13LDFLNGDHdpJQR9UhCB8g1jS1Zp0e7+RC2+634p6jlW6 L9hIfKkB929mzut6IilC7YiWXvym/+kMAUxgxuqBQ288HDvPX3 FSiziLtCyfAM6Oz7LWiTTyr7NntkHvSKLia/8cZNavqGVVZoN9 LSYVBLfhJI/I0xhAZbHimXa0jX7DsAhvRH0hBFrw45KgeSj30r Mt3klCxOBSCYyFaDbtcv0BkttUg0W3UAKkRy4fAbAraZyBLvsX kveWjG6gWdw3nmH2JAR319kCfcKeSOvmngNrY/3GVIeCVkolfr XEkZl0IyYXO8pwoUMjpCycBN/D77ZWiRt/zvUf0qR X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/263 X-Sequence-Number: 48629 --nextPart2553040.f2ebKuQQ84 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Le mercredi 21 novembre 2012 17:34:02, Craig James a =E9crit : > On Wed, Nov 21, 2012 at 5:42 AM, Kevin Grittner wrote: > > It's a tough problem. Disguising and not documenting the available > > optimizer hints leads to more reports on where the optimizer should > > be smarter, and has spurred optimizer improvements. ... > > Regarding the above-mentioned benefits we would stand to lose by > > having clear and documented hints, perhaps we could occasionally > > solicit input on where people are finding hints useful to get ideas > > on where we might want to improve the optimizer. As far as worrying > > about people using hints to force a plan which is sub-optimal -- > > isn't that getting into nanny mode a bit too much? >=20 > Toward that end, the hint documentation (which is almost always viewed as > HTML) could be prefaced by a strong suggestion to post performance > questions in this group first, with links to the "subscribe" page and the > "how to report performance problems" FAQ. The hint documentation could ev= en > be minimalistic; suggest to developers that they should post their > problematic queries here before resorting to hints. That would give the > experts an opportunity to provide the normal advice. The correct hint > syntax would be suggested only when all other avenues failed. We have hooks in PostgreSQL. We already have at least one extension which i= s=20 using that to change the planner behavior. We can have a bit more hooks and try to improve the cost estimate, this par= t=20 of the code is known to be built by reports and human estimations, also the= =20 9.2 version got heavy modifications in this area.=20 Let the 'Hints' be inside an extension thus we are able to track them and f= ix=20 the planner/costestimate issues. I don't see why PostgreSQL needs 'Hints' *in-core*. =2D-=20 C=E9dric Villemain +33 (0)6 20 30 22 52 http://2ndQuadrant.fr/ PostgreSQL: Support 24x7 - D=E9veloppement, Expertise et Formation --nextPart2553040.f2ebKuQQ84 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJQr0qAAAoJENsgH0yzVBebMqwIAIIqFS9LCcokUL2msYTcRoho Xi26Pavl/4EySMxy2SHeeALxz+KqM+GzHyje5L25V2iKOIImCWO7gXbcYlv79jth ZSNFN7oAHMLAPk8mqQHdPvUyNBJog1QJ/mmJpiORCIlIgF+J0P1nxwvwKRcloRyM +z8CXET6i8hPmUyDLqa+BsYep2lJsT1xTxcUhQpmU5qdyrQR+LAd7GLAnzmIPzoO y7nROp9ZsQ9kPQTRTe2ECfcf/U7S41Tsw7R0u+ihWt3FFaoVy6p4J/Ka3mHnL5jQ pbWkE9ko7xBdmhSRj5mDLlUUzhw2hOdcBqyiZE8zgUw4W5K1ovs1GYnQ8d52wY8= =OdwT -----END PGP SIGNATURE----- --nextPart2553040.f2ebKuQQ84--