Schema design question as it pertains to performance

From: "Benjamin Krajmalnik" <kraj(at)servoyant(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Schema design question as it pertains to performance
Date: 2013-01-22 21:33:05
Message-ID: F4E6A2751A2823418A21D4A160B6898892B899@fletch.stackdump.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2013-01-22 21:56:01 Re: Schema design question as it pertains to performance
Previous Message Albe Laurenz 2013-01-18 10:09:56 Re: Need assistance in incremental backup for my environment