Re: amazon ec2 - Mailing list pgsql-performance

From Denis de Bernardy
Subject Re: amazon ec2
Date
Msg-id 781460.25103.qm@web112419.mail.gq1.yahoo.com
Whole thread Raw
In response to Re: amazon ec2  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
----- 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-rowlookups 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
repeatedover and over. Memcache lets you pull those straight from the memory, allowing for the DB server to handle new
queriesexclusively. 


pgsql-performance by date:

Previous
From: david@lang.hm
Date:
Subject: Re: amazon ec2
Next
From: Didik Prasetyo
Date:
Subject: ask the database engine tuning on the server