From: | Andy Colson <andy(at)squeakycode(dot)net> |
---|---|
To: | Fredric Fredricson <Fredric(dot)Fredricson(at)bonetmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Best practice to get performance |
Date: | 2010-11-19 14:49:55 |
Message-ID: | 4CE68E93.2040409@squeakycode.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 11/18/2010 4:56 PM, Fredric Fredricson wrote:
> Hi,
> I have designed a handful databases but is absolutely no SQL-expert. Nor
> have I had any formal database training and have never worked with
> someone who had. What I know about SQL I have read in the documentation,
> found with google, and learned from my numerous mistakes.
>
> This question I have is somewhat related to the "unlogged tables"
> proposal that is discussed in another thread.
>
> The background is that I am designing a data storage that, unlike all
> other data storage, have some performance requirements (yes, that was a
> joke ;-).
> What I have done to handle this is to create "lookup" tables that cache
> preprocessed information. The simplest is row count but also results
> from selects with joins and group clauses. These tables are updated
> either on demand (first call), by triggers, or periodically.
>
> I assumed this was fairly standard practice and when I read about
> unlogged tables these tables was the first use that came to my mind.
> Since the lookup tables are used for performance and contain redundant
> data loosing the data at a restart is no real problem.
>
> What puzzle me though is that this use is never mentioned in the
> discussions, at least as far as I can see. Am I doing something
> "strange"? Is this something you should not have to do if you have
> "proper" database design?
>
> Regards
> /Fredric
unlogged will only help insert/update performance. Lookup tables sound
readonly for a majority of time. (I'm assuming lots of reads and every
once and a while updates). I doubt that unlogged tables would speed up
lookup tables.
-Andy
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-11-19 15:14:59 | Re: Forums at postgresql.com.au |
Previous Message | Dave Page | 2010-11-19 14:43:34 | Re: Forums at postgresql.com.au |