Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 774B41337C5A for ; Wed, 4 May 2011 21:23:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 67730-01-10 for ; Thu, 5 May 2011 00:23:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm28-vm0.bullet.mail.sp2.yahoo.com (nm28-vm0.bullet.mail.sp2.yahoo.com [98.139.91.234]) by mail.postgresql.org (Postfix) with SMTP id 2FA1B1337C9E for ; Wed, 4 May 2011 21:21:15 -0300 (ADT) Received: from [98.139.91.64] by nm28.bullet.mail.sp2.yahoo.com with NNFMP; 05 May 2011 00:21:15 -0000 Received: from [98.139.91.22] by tm4.bullet.mail.sp2.yahoo.com with NNFMP; 05 May 2011 00:21:15 -0000 Received: from [127.0.0.1] by omp1022.mail.sp2.yahoo.com with NNFMP; 05 May 2011 00:21:15 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 285512.35919.bm@omp1022.mail.sp2.yahoo.com Received: (qmail 25637 invoked by uid 60001); 5 May 2011 00:21:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1304554874; bh=5vSBenI9vY08fW42MonY6Ma7xKkwm21Rl9WlertUQyc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=oRlzTRgPA5MXmiIDOCcKD1sYhVc1+G2o+5HoeKhum7JllQIGxxjrPForeM0Bc5Wechs+Bkxr1N1hVBWEOirBAKvWDvWnAM9eXU6wuaFZ5B6cwEsJUwi+/r/dj8XvZbEnkdL2SUpkMRwZeNF635zEmSjW1c3+1hgU6k7/z/c+h/s= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=VaKGKPZrA30A0IJYlNQurX5ScR43MQBwHBJwjK6fvOaIkRdV0JYM6eOxYRhsnS/iAV78PN27G1HFwSuEwT4lilf5VYnI2KLZdcXGRPKbEq81NAzpFnxVZZbK9OvXxcBoYp6VgByTfj4Id4Bj9S56psgxnBF+snE0tUZkB1sz8Qo=; Message-ID: <781460.25103.qm@web112419.mail.gq1.yahoo.com> X-YMail-OSG: ZgSuUxsVM1nGojEb1k5kHeALikhsyWH00sDTok02j.7R.Su yazb.5wDu1xv8wmdAJX7c_tHTABdLBseJDRB4pclU9JYQvBPeveA4wegvVdB beJS_vXPxYiHuSjHSHIIt_nR_2_7UpjhWlH9M0VXXlJR6iExLahDB3Phc7xE CFq1HcNIUZfPThj4MMdvRhGjE7_Zumv0k3Xa0SnelJcxzN62k9XpuMqPXy9j 2VrGC7LRWvPuGkkw5sRyCHmn6NfMB3T8JtRaghPz1wsF2Se0xkfDiYQwUdqV rSXE7pSDw1uzDTFimEKmX7n8axqlDD9i57t6fffoWl.XKugrBK2bjVW36KVR k0t2o6hG5nM32nPkpYygVD8__Zmr274zlhZlOJMvBUMMFPtRwzDFk1cgjbnW UuBdRcri7JkPwwg-- Received: from [88.203.16.8] by web112419.mail.gq1.yahoo.com via HTTP; Wed, 04 May 2011 17:21:14 PDT X-Mailer: YahooMailWebService/0.8.110.299900 References: <201105031241.20348.ahodgson@simkin.ca> <201105031309.52154.ahodgson@simkin.ca> <4DC08420.7050602@2ndquadrant.com> <00C0C53C-7042-4C05-B6CD-68BFDF400C76@nasby.net> <4DC1E92D.5020904@agliodbs.com> Date: Wed, 4 May 2011 17:21:14 -0700 (PDT) From: Denis de Bernardy Reply-To: Denis de Bernardy Subject: Re: amazon ec2 To: PG Performance In-Reply-To: <4DC1E92D.5020904@agliodbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.908 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/57 X-Sequence-Number: 43566 ----- Original Message -----=0A=0A> From: Josh Berkus = =0A> To: postgres performance list =0A> C= c: =0A> Sent: Thursday, May 5, 2011 2:02 AM=0A> Subject: Re: [PERFORM] amaz= on ec2=0A> So memcached basically replaces the filesystem?=0A> =0A> That so= unds cool, but I'm wondering if it's actually a performance=0A> speedup.=A0= Seems like it would only be a benefit for single-row lookups;=0A> any larg= e reads would be a mess.=0A=0A=0AI've never tested with pgsql, but with mys= ql it makes a *huge* difference when you're pulling data repeatedly. Multi-= row lookups can be cached too:=0A=0A$rows =3D $cache->get(md5($query . '--'= . serialize($args)));=0A=0Aif ( !$rows) {=0A=A0=A0// query and cache for a= few hours...=0A}=0A=0AThis is true even with mysql's caching features turn= ed on. You spare the DB from doing identical queries that get repeated over= and over. Memcache lets you pull those straight from the memory, allowing = for the DB server to handle new queries exclusively.=0A