report generation from table.

From: sathiya psql <sathiya(dot)psql(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: report generation from table.
Date: 2009-10-21 11:52:41
Message-ID: f966c2ee0910210452x4a60093ds772b62063e72fe8c@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi All,

I have been searching for, Preparing report from a huge table.

Queries am executing now are,
SELECT count(*) from HUGE_TBL where cond1, cond2;
SELECT count(*) from HUGE_TBL where cond1, cond3;
--- like this i have different conditions(10-15 different things ) and
different amount of conditions ( 2 - 5 condition ).

As that is a very huge table, it took time to execute each query ( 2 min ).
And finally it takes 15 times that ( 30 min ). Is there anyway to do the
above report efficiently ?

Such executing the query only once, and getting all different outputs
required ? or fetching result from some cache ?
Or i dont have any other way ?!

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2009-10-21 12:16:08 Re: report generation from table.
Previous Message Craig Ringer 2009-10-20 23:51:39 Re: Random Unique Id