pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Navaneethan R <nava@gridlex.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Scaling 10 million records in PostgreSQL table
Date: Tue, 09 Oct 2012 04:27:45 +0800
Message-ID: <50733741.30609@ringerc.id.au> (raw)
In-Reply-To: <b2d0ada9-f13a-4269-b378-1ceaf2451190@googlegroups.com>
References: <b2d0ada9-f13a-4269-b378-1ceaf2451190@googlegroups.com>

On 10/08/2012 11:26 PM, Navaneethan R wrote:
> Hi all,
>
>        I have 10 million records in my postgres table.I am running the database in amazon ec2 medium instance.

EC2 usually means "My I/O performance is terrible" and "medium instance" 
means "I don't have enough RAM for caching to make up for my terrible 
I/O" at the database sizes you're talking.

Anything that hits most of the database is likely to perform pretty 
poorly on something like EC2. It might be worth considering one of the 
high memory or high I/O instances, but unfortunately they only come in 
"really big and really expensive".

If you already have appropriate indexes and have used `explain analyze` 
to verify that the query isn't doing anything slow and expensive, it's 
possible the easiest way to improve performance is to set up async 
replication or log shipping to a local hot standby on real physical 
hardware, then do the query there.

--
Craig Ringer





view thread (10+ messages)  latest in thread

Message-ID: <50733741.30609@ringerc.id.au>
Permalink:  ../50733741.30609@ringerc.id.au/
Also on:    postgresql.org/message-id/50733741.30609@ringerc.id.au

 · 

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: ringerc@ringerc.id.au, nava@gridlex.com
  Subject: Re: Scaling 10 million records in PostgreSQL table
  In-Reply-To: <50733741.30609@ringerc.id.au>

* 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