pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-performance@postgresql.org
Subject: Re: Performance question 83 GB Table 150 million rows, distinct select
Date: Wed, 16 Nov 2011 21:19:01 -0800
Message-ID: <4EC49945.40408@agliodbs.com> (raw)
In-Reply-To: <CAEaSS0Y2W=2h6aGj0eUnnjP7JnVUqtjj+7_mczQVBfGQ3L8ZGw@mail.gmail.com>
References: <CAEaSS0b7D4eyDi4kt-Dt8u-yGq+akD=5PZwMk_TUHP-zujAnCQ@mail.gmail.com>
	<e9ec6f004095262038f7a2b3d9e303e0.squirrel@sq.gransy.com>
	<CAOR=d=2ZHAf=jubZXXOFOHyrwGqf-UUGwZ6TO0sHjbTzDN6_-Q@mail.gmail.com>
	<57c79e7822e93c2325245ab4f5606acc.squirrel@sq.gransy.com>
	<CAEaSS0Y2W=2h6aGj0eUnnjP7JnVUqtjj+7_mczQVBfGQ3L8ZGw@mail.gmail.com>

Tory,

A seq scan across 83GB in 4 minutes is pretty good.   That's over
300MB/s.  Even if you assume that 1/3 of the table was already cached,
that's still over 240mb/s.  Good disk array.

Either you need an index, or you need to not do this query at user
request time.  Or a LOT more RAM.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



view thread (21+ messages)  latest in thread

Message-ID: <4EC49945.40408@agliodbs.com>
Permalink:  ../4EC49945.40408@agliodbs.com/
Also on:    postgresql.org/message-id/4EC49945.40408@agliodbs.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: josh@agliodbs.com
  Subject: Re: Performance question 83 GB Table 150 million rows, distinct select
  In-Reply-To: <4EC49945.40408@agliodbs.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