Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yy2Bb-00010c-5E for pgsql-performance@arkaria.postgresql.org; Thu, 28 May 2015 18:05:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yy2BZ-0000eo-Re for pgsql-performance@arkaria.postgresql.org; Thu, 28 May 2015 18:05:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yy2BY-0000ee-LQ for pgsql-performance@postgresql.org; Thu, 28 May 2015 18:05:40 +0000 Received: from mail-bn1on0080.outbound.protection.outlook.com ([157.56.110.80] helo=na01-bn1-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Yy2BV-00009W-66 for pgsql-performance@postgresql.org; Thu, 28 May 2015 18:05:39 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jim.Nasby@bluetreble.com; Received: from decina.attlocal.net (2602:306:ce8b:3460:5ca5:7306:9586:94e2) by CY1PR11MB0684.namprd11.prod.outlook.com (25.163.236.22) with Microsoft SMTP Server (TLS) id 15.1.172.22; Thu, 28 May 2015 18:05:32 +0000 Message-ID: <556758EE.6000503@BlueTreble.com> Date: Thu, 28 May 2015 13:05:34 -0500 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ravi Krishna , Subject: Re: Partitioning and performance References: In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [2602:306:ce8b:3460:5ca5:7306:9586:94e2] X-ClientProxiedBy: BN1PR08CA0043.namprd08.prod.outlook.com (10.242.217.171) To CY1PR11MB0684.namprd11.prod.outlook.com (25.163.236.22) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR11MB0684; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(520003)(3002001); SRVR:CY1PR11MB0684; BCL:0; PCL:0; RULEID:; SRVR:CY1PR11MB0684; X-Forefront-PRVS: 0590BBCCBC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(377454003)(199003)(479174004)(24454002)(189002)(101416001)(99136001)(86362001)(83506001)(50986999)(80316001)(81156007)(4001350100001)(87266999)(69596002)(53416004)(54356999)(4001540100001)(19580395003)(87976001)(15975445007)(5001770100001)(65816999)(97736004)(64706001)(50466002)(65806001)(33656002)(65956001)(68736005)(76176999)(47776003)(2950100001)(189998001)(40100003)(105586002)(23746002)(46102003)(62966003)(36756003)(5001830100001)(106356001)(122386002)(42186005)(92566002)(5001860100001)(107886002)(5001960100002)(64126003)(59896002)(77156002)(3826002)(85282002)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR11MB0684; H:decina.attlocal.net; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: bluetreble.com does not designate permitted sender hosts) X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 May 2015 18:05:32.8600 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR11MB0684 X-Pg-Spam-Score: -3.0 (---) 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 5/28/15 9:31 AM, Ravi Krishna wrote: > explain select count(*) from tstesting.account where account_row_inst = 101 ; > Aggregate (cost=8.16..8.17 rows=1 width=0) > -> Index Only Scan using account_pkey on account (cost=0.14..8.16 > rows=1 width=0) > Index Cond: (account_row_inst = 101) EXPLAIN only shows what the planner thinks a query will cost. For any real testing, you need EXPLAIN ANALYZE. Also, understand that partitioning isn't a magic bullet. It can make some operations drastically faster, but it's not going to help every scenario, and will actually slow some other operations down. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance