pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pierre C <lists@peufeu.com>
To: 'Kevin Grittner' <Kevin.Grittner@wicourts.gov>
To: 'Richard Huxton' <dev@archonet.com>
To: 'Sergey Konoplev' <gray.ru@gmail.com>
To: Anibal David Acosta <aa@devshock.com>
Cc: pgsql-performance@postgresql.org, "'Stephen Frost'" <sfrost@snowman.net>
Subject: Re: unlogged tables
Date: Sun, 04 Dec 2011 13:28:03 +0100
Message-ID: <op.v5ysw1d3eorkce@apollo13> (raw)
In-Reply-To: <00ff01cca2f4$3cb86860$b6293920$@devshock.com>
References: <005501cca0ad$b9478440$2bd68cc0$@devshock.com>
	<20111111201822.GN24234@tamriel.snowman.net>
	<CAL_0b1t02q77ft2JWdjMv8q4vaGm=x__K0rzVkpNSvSy2-SjzA@mail.gmail.com>
	<4EC0D827.8090601@archonet.com>
	<CAL_0b1tuxi9YVhGKsNUSTZCUBXgOmppan7w+KkRZARbQ=u4P5w@mail.gmail.com>
	<4EC0EAD6.9010302@archonet.com>
	<CAL_0b1sSyTgMUxcRi+2ibTHHV4-qH3fvacsQUCbbeBsu0jYGAQ@mail.gmail.com>
	<00ea01cca2ef$abcf3a30$036dae90$@devshock.com>
	<4EC0FAE80200002500042E6C@gw.wicourts.gov>
	<00ff01cca2f4$3cb86860$b6293920$@devshock.com>

> My table is a statistics counters table, so I can live with a partial  
> data
> loss, but not with a full data loss because many counters are weekly and
> monthly.
>
> Unlogged table can increase speed, this table has about 1.6 millions of
> update per hour, but unlogged with a chance of loss all information on a
> crash are not a good idea for this.

You could use an unlogged table for hourly updates, and periodically,  
accumulate those counters to a (logged) daily/weekly table...

The hourly table could be rebuilt by examining only 1 hour's worth of  
data, so it isn't too much of a problem if it's lost. The other tables  
would get much less updates.



view thread (42+ messages)  latest in thread

Message-ID: <op.v5ysw1d3eorkce@apollo13>
Permalink:  ../op.v5ysw1d3eorkce@apollo13/
Also on:    postgresql.org/message-id/op.v5ysw1d3eorkce@apollo13

 · 

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: lists@peufeu.com, Kevin.Grittner@wicourts.gov, dev@archonet.com, gray.ru@gmail.com, aa@devshock.com, sfrost@snowman.net
  Subject: Re: unlogged tables
  In-Reply-To: <op.v5ysw1d3eorkce@apollo13>

* 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