Re: Creating tons of tables to support a query

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jan Ploski <jpljpl(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating tons of tables to support a query
Date: 2002-09-08 23:51:55
Message-ID: 20020908235155.GA27425@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Sep 08, 2002 at 23:58:44 +0200,
Jan Ploski <jpljpl(at)gmx(dot)de> wrote:
>
> select count(*) from message where sectionID = ? and dateSent > ?

If the dateDent is the same for each query, you should probably be doing
it in one query. Something like:
select sectionID, count(*) from message where dateSent > ? group by sectionID

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jan Ploski 2002-09-08 23:54:07 Re: Creating tons of tables to support a query
Previous Message Martijn van Oosterhout 2002-09-08 23:36:17 Re: Creating tons of tables to support a query