Re: Many, many materialised views - Performance?

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Toby Corkindale <toby(dot)corkindale(at)strategicdata(dot)com(dot)au>, Alban Hertroys <haramrae(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Many, many materialised views - Performance?
Date: 2013-10-09 02:08:45
Message-ID: 1381284525.95722.YahooMailNeo@web162901.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Toby Corkindale <toby(dot)corkindale(at)strategicdata(dot)com(dot)au> wrote:

> In this instance, we have a lot of queries that build certain aggregate
> results, which are very slow. The queries were initially all implemented
> as views, but then we started doing a type of materialising of our own,
> turning them into tables with CREATE TABLE AS SELECT ....
> This does make the results very fast to access now, but the side effect
> is a vast number of (very small) tables.

If you have multiple tables with identical layout but different
subsets of the data, you will probably get better performance by
putting them into a single table with indexes which allow you to
quickly search the smaller sets within the table.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Jelinek 2013-10-09 02:12:42 Re: Hi, Friends, are there any ETL tools (free or commercial) available for PostgreSQL?
Previous Message Toby Corkindale 2013-10-08 23:34:17 Re: Many, many materialised views - Performance?