Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 17C58B5DC6A for ; Fri, 15 Jul 2011 18:41:30 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 18135-03 for ; Fri, 15 Jul 2011 21:41:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm3.bullet.mail.sp2.yahoo.com (nm3.bullet.mail.sp2.yahoo.com [98.139.91.73]) by mail.postgresql.org (Postfix) with SMTP id 9A7FAB5DC68 for ; Fri, 15 Jul 2011 18:41:23 -0300 (ADT) Received: from [98.139.91.64] by nm3.bullet.mail.sp2.yahoo.com with NNFMP; 15 Jul 2011 21:41:22 -0000 Received: from [208.71.42.206] by tm4.bullet.mail.sp2.yahoo.com with NNFMP; 15 Jul 2011 21:41:22 -0000 Received: from [127.0.0.1] by smtp217.mail.gq1.yahoo.com with NNFMP; 15 Jul 2011 21:41:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1310766082; bh=dXPYAP4/M120EheUTz0UvwFe2Url/X7iMmb/iksdjkg=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=yNOgtvT4dGKBa9fvPYdRHK9uXBSSSBy6cLt3AC69f6TBmAOMykzlPzEHa28FszagTNA6IPvc2AwjJxXqcXb8apkyuqgus9hZ95Cn0P5a1XM4u8w9mI3RbAeoj4FRhxQ/n5W5ONlpdzPR49MnY5A61i48bNFE3lkORDWkEekrscY= X-Yahoo-Newman-Id: 476852.77358.bm@smtp217.mail.gq1.yahoo.com Received: from [192.168.206.5] (lhofhansl@67.170.234.149 with plain) by smtp217.mail.gq1.yahoo.com with SMTP; 15 Jul 2011 14:41:22 -0700 PDT X-Yahoo-SMTP: YmezqLWswBDx0ai534H100MJuqGzDQ-- X-YMail-OSG: 4oMHzN8VM1mPP0IHMgfAwtlnDEv7igfzKAvPFHLXshCMQRE eoWOUrFMijCj.XE_lvj30pX2FVvBw8cpRYwxu2XORYpxlcLNMTHH7xMnCWQk a8h6negA_o91DPVVOvkaVcO06_M1YxjTyD0caKFZc_OgYC0.M2ldNUdCPYHz hlONVyeyhapYqG5.G_L7XswX5lwCxgnjQnJ5Xw_MsUJgWR4z9GgzlPvzDA.Q Xscr.mTF5MLAqd0w9ss9EibPZ.X0CIf1dGqhX2GyY9p6L4qQj1pHBXO9xcU1 ZXaBf.Qul849fbXMhCHaGK4hocnUcxlnYtEeAxpyiX6l8vuF9mWjsUgA0PgU FfjhKfsQW0WBbOfwrotW447cHA_svFG7EIFJ6GQma X-Yahoo-Newman-Property: ymail-3 Message-ID: <4E20B3E5.6070507@yahoo.com> Date: Fri, 15 Jul 2011 14:40:53 -0700 From: lars User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Thunderbird/3.1.11 MIME-Version: 1.0 To: Samuel Gendler CC: pgsql-performance@postgresql.org Subject: Re: Statistics and Multi-Column indexes References: <4E1A1696.5010307@yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=0.001 X-Spam-Level: X-Archive-Number: 201107/166 X-Sequence-Number: 44378 On 07/10/2011 02:31 PM, Samuel Gendler wrote: > What about partitioning tables by tenant id and then maintaining > indexes on each partition independent of tenant id, since constraint > exclusion should handle filtering by tenant id for you. That seems > like a potentially more tolerable variant of #5 How many tenants are > we talking about? I gather partitioning starts to become problematic > when the number of partitions gets large. > I thought I had replied... Apparently I didn't. The database can grow in two dimensions: The number of tenants and the number of rows per tenant. We have many tenants with relatively little data and a few with a lot of data. So the number of tenants is known ahead of time and might be 1000's. -- Lars