Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxlSy-0008CQ-BT for pgsql-admin@arkaria.postgresql.org; Tue, 22 Jan 2013 21:33:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TxlSx-0006Uu-ED for pgsql-admin@arkaria.postgresql.org; Tue, 22 Jan 2013 21:33:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxlSw-0006UW-Mc for pgsql-admin@postgresql.org; Tue, 22 Jan 2013 21:33:10 +0000 Received: from [64.207.29.137] (helo=mail.illumen.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TxlSu-0007HN-AI for pgsql-admin@postgresql.org; Tue, 22 Jan 2013 21:33:10 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Schema design question as it pertains to performance Date: Tue, 22 Jan 2013 14:33:05 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Schema design question as it pertains to performance Thread-Index: Ac345fRDGGXgDTtXQxWZ+prV6EY0cA== From: "Benjamin Krajmalnik" To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.207.29.137 (failed) X-Pg-Spam-Score: 3.2 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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. =46rom 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 --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin