pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Benjamin Krajmalnik <kraj@servoyant.com>
To: pgsql-admin@postgresql.org
Subject: Schema design question as it pertains to performance
Date: Tue, 22 Jan 2013 14:33:05 -0700
Message-ID: <F4E6A2751A2823418A21D4A160B6898892B899@fletch.stackdump.local> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

This question pertains to PG 9.0.4 running on FreeBSD amd64.  Was not
sure if it should go into the general list or the performance list, so
my apologies if I opted for the wrong list.

We currently have  a db schema which contains many wide indices which
usually contain one column which is constantly changing (such as a last
update time).
It was designed that way because at the time we were unaware that PG
could utilize multiple indices in a query.
Our database is very heavy un update queries, since the same records get
updated many times per minute.
As a result, that very wide index is constantly being updated, which I
am sure is one of the sources of some heavy disk i/o I am seeing.
Until recently, this design was not affecting performance, but as we
have more devices sending data, we are seeing a significant hit on the
i/o, and data is getting queued by the daemons which insert it creating
a backlog of "real time" data.
From a performance standpoint, is there a big hit on select performance
if a query ends up utilizing more than one index, taking into account
that an index has been used already to reduce the data set of potential
records, and the secondary index would mostly be used in the ordering of
the result set (such as a last updated time)?
I also assume that if no data has changed in an index, nothing is done
when the record is updated as pertains to the particular index - am I
correct in this assumption?

Our data is already partitioned and triggers send it to the correct
partition.

Thanks in advance,

Benjamin


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (5+ messages)  latest in thread

Message-ID: <F4E6A2751A2823418A21D4A160B6898892B899@fletch.stackdump.local>
Permalink:  ../F4E6A2751A2823418A21D4A160B6898892B899@fletch.stackdump.local/
Also on:    postgresql.org/message-id/F4E6A2751A2823418A21D4A160B6898892B899@fletch.stackdump.local

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: kraj@servoyant.com
  Subject: Re: Schema design question as it pertains to performance
  In-Reply-To: <F4E6A2751A2823418A21D4A160B6898892B899@fletch.stackdump.local>
  References: <F4E6A2751A2823418A21D4A160B6898892B899@fletch.stackdump.local>

* 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