pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndquadrant.com>
To: rama <rama.rama@tiscali.it>
Cc: pgsql-performance@postgresql.org
Subject: Re: perf problem with huge table
Date: Wed, 10 Feb 2010 20:42:13 -0500
Message-ID: <4B736075.1080704@2ndquadrant.com> (raw)
In-Reply-To: <BDE4B02A-24A4-46C1-9C76-63AA5DD57B40@tiscali.it>
References: <BDE4B02A-24A4-46C1-9C76-63AA5DD57B40@tiscali.it>

rama wrote:
> in that way, when i need to do a query for a long ranges  (ie: 1 year) i just take the rows that are contained to contab_y
> if i need to got a query for a couple of days, i can go on ymd, if i need to get some data for the other timeframe, i can do some cool intersection between 
> the different table using some huge (but fast) queries.
>
> Now, the matter is that this design is hard to mantain, and the tables are difficult to check
>   

You sound like you're trying to implement something like materialized 
views one at a time; have you considered adopting the more general 
techniques used to maintain those so that you're not doing custom 
development each time for the design?

http://tech.jonathangardner.net/wiki/PostgreSQL/Materialized_Views
http://www.pgcon.org/2008/schedule/events/69.en.html

I think that sort of approach is more practical than it would have been 
for you in MySQL, so maybe this wasn't on your list of possibilities before.

-- 
Greg Smith    2ndQuadrant   Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com  www.2ndQuadrant.com




view thread (10+ messages)  latest in thread

Message-ID: <4B736075.1080704@2ndquadrant.com>
Permalink:  ../4B736075.1080704@2ndquadrant.com/
Also on:    postgresql.org/message-id/4B736075.1080704@2ndquadrant.com

 · 

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: greg@2ndquadrant.com, rama.rama@tiscali.it
  Subject: Re: perf problem with huge table
  In-Reply-To: <4B736075.1080704@2ndquadrant.com>

* 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