pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Denis de Bernardy <ddebernardy@yahoo.com>
To: PG Performance <pgsql-performance@postgresql.org>
Subject: Re: amazon ec2
Date: Wed, 4 May 2011 17:21:14 -0700 (PDT)
Message-ID: <781460.25103.qm@web112419.mail.gq1.yahoo.com> (raw)
In-Reply-To: <4DC1E92D.5020904@agliodbs.com>
References: <ADB48657-780F-4465-ABE6-752C2FB3AF48@gmail.com>
	<201105031241.20348.ahodgson@simkin.ca>
	<F3B854F7-53C8-4895-99BF-EB64BD6E5B53@gmail.com>
	<201105031309.52154.ahodgson@simkin.ca>
	<BANLkTinKbgzSGwg1GWTpwUCkwSpaCaebsA@mail.gmail.com>
	<4DC08420.7050602@2ndquadrant.com>
	<00C0C53C-7042-4C05-B6CD-68BFDF400C76@nasby.net>
	<4DC1E92D.5020904@agliodbs.com>

----- Original Message -----

> From: Josh Berkus <josh@agliodbs.com>
> To: postgres performance list <pgsql-performance@postgresql.org>
> Cc: 
> Sent: Thursday, May 5, 2011 2:02 AM
> Subject: Re: [PERFORM] amazon ec2
> So memcached basically replaces the filesystem?
> 
> That sounds cool, but I'm wondering if it's actually a performance
> speedup.  Seems like it would only be a benefit for single-row lookups;
> any large reads would be a mess.


I've never tested with pgsql, but with mysql it makes a *huge* difference when you're pulling data repeatedly. Multi-row lookups can be cached too:

$rows = $cache->get(md5($query . '--' . serialize($args)));

if ( !$rows) {
  // query and cache for a few hours...
}

This is true even with mysql's caching features turned 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.




view thread (16+ messages)  latest in thread

Message-ID: <781460.25103.qm@web112419.mail.gq1.yahoo.com>
Permalink:  ../781460.25103.qm@web112419.mail.gq1.yahoo.com/
Also on:    postgresql.org/message-id/781460.25103.qm@web112419.mail.gq1.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: ddebernardy@yahoo.com
  Subject: Re: amazon ec2
  In-Reply-To: <781460.25103.qm@web112419.mail.gq1.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox