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-09 01:02:06 |
Message-ID: | 20020909010206.GA28109@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Sep 09, 2002 at 01:54:08 +0200,
Jan Ploski <jpljpl(at)gmx(dot)de> wrote:
>
> The dateSent is not same for each section, though it may be same
> for several sections (in my app, sections belong to forums, and dateSent
> is same for all sections of the same forum). Anyway, I would like to avoid
> counting by traversing a huge number of rows, and I think it's what the
> backend does behind the scenes for such a query.
Well it sounds like group by won't by you all that much.
However, counts aren't saved anywhere so you are going to need to
look at each row that satisfies the condition of the query.
You might want to double check that the time of the two timestamps
(the one in the table and the constant used for a particular query)
are the same type. If not you may need a cast to get postgres to use
the index.
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2002-09-09 02:32:38 | Australian Open Source Awards |
Previous Message | Adrian Urquhart | 2002-09-09 00:31:19 | Problem trying to use OpenSSL |