Re: amazon ec2

From: Denis de Bernardy <ddebernardy(at)yahoo(dot)com>
To: PG Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: amazon ec2
Date: 2011-05-05 00:21:14
Message-ID: 781460.25103.qm@web112419.mail.gq1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

> From: Josh Berkus <josh(at)agliodbs(dot)com>
> To: postgres performance list <pgsql-performance(at)postgresql(dot)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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Didik Prasetyo 2011-05-05 01:18:59 ask the database engine tuning on the server
Previous Message david 2011-05-05 00:12:30 Re: amazon ec2