Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsHhU-0001Le-TO for pgsql-performance@arkaria.postgresql.org; Thu, 27 Jun 2013 19:17:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UsHhU-0004cf-Dd for pgsql-performance@arkaria.postgresql.org; Thu, 27 Jun 2013 19:17:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsHhT-0004cZ-L6 for pgsql-performance@postgresql.org; Thu, 27 Jun 2013 19:17:47 +0000 Received: from smtp.optionshouse.com ([38.98.137.6] helo=smtp.peak6.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UsHhO-0005ni-Sc for pgsql-performance@postgresql.org; Thu, 27 Jun 2013 19:17:47 +0000 X-AuditID: 0a64cb20-b7f016d000006b7a-db-51cc8fd4a76e Message-ID: <51CC8FD4.10401@optionshouse.com> Date: Thu, 27 Jun 2013 14:17:40 -0500 From: Shaun Thomas Reply-To: Organization: Peak6 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: "Albin, Lloyd P" CC: Dave Johansen , bricklen , "pgsql-performance@postgresql.org" Subject: Re: Partitions not Working as Expected References: <51CC652F.3010304@optionshouse.com> <51CC73B6.2050406@optionshouse.com> <51CC8160.2080905@optionshouse.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed content-transfer-encoding: 7bit X-Originating-IP: [10.10.201.64] X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnleLIzCtJLcpLzFFi42LhSuGV0L3SfybQ4OJOHYv1Hw+yWvxv+8No sWbRNRaL6zPPMTuweOycdZfd48K+aeweU080sgYwRzUw2iTm5eWXJJakKqSkFifbKvkXlGTm 5xV75JcWpyq4ZBYn5yRm5qYWKSlkptgqGSspFOQkJqfmpuaV2ColFhSk5qUo2XEpYAAboLLM PIXUvOT8lMy8dFslz2B/XQsLU0tdQyW7eGSQ0MmScXPBeeaCBewVq1+2sjUwPmTtYuTkkBAw kTg8qYEJwhaTuHBvPRuIzSugK/Hp2n+wGhYBVYkHZ+cwgthsQPFJ/SvAaoQEVCT6zt4A6+UX EJbY96GJGcQWFQiTeL9sKivEHEGJkzOfsIDYIgIaEnM3zmTvYuTiYBaYxCjxsrULbKiwgKXE teVbWEASQgL/mCQ2HFgHNolTwFViw51jYBuYBWwlLsy5zgJhy0tsfzuHGeIKVYkVzRPZID5Q kPh/5R3TBEahWUiWz0LSPgtJ+wJG5lWM4sVlickZmaYFxbklBUZ6BamJ2WZ6eaklmxjBsX1a YQfj906rQ4wCHIxKPLwT888ECrEmlhVX5h5ilOBgVhLhPeIPFOJNSaysSi3Kjy8qzUktPsTo Awy1icxSosn5wLSTVxJvaGxqYGppamhqbmpohENYSZx3H9OyQCGBdGA6yU5NLUgtghnHxMEp 1cCYOjPuzfQtcprHpykKvDm3QkG8efLj82/WW7GsSffJ2Dpv1m+f6DPrhCQ4d5nKbC/prGna 0XZyoW30lGnba4+v4VY7x1HxJP3o8dij4Sq6S7U2uHpeifqkU/vpCHNBxuPAc697fmwLZ5kj Z77BJ/jO34tM300q5j09bu93pPm7lNycqIbFtzS/K7EUZyQaajEXFScCAFhrqsQaAwAA X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 06/27/2013 01:45 PM, Albin, Lloyd P wrote: > We have also run into this with our production databases. We worked > around the issue by adding an index to each child table so that it > scans all the child index's instead of the child table's. For us > this made a large performance improvement. Haha. Yeah, that's assumed. I'd never use a partition set without the constraint column in at least one index. The proof of concept was just to illustrate that the planner doesn't even get that far in ignoring "empty" partitions. Sure, scanning the inapplicable child tables has a low cost, but it's not zero. With about a dozen of them, query times increase from 0.130ms to 0.280ms for my test case. Not a lot in the long run, but in a OLTP system, it can be fairly noticeable. -- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604 312-676-8870 sthomas@optionshouse.com ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance