Re: Creating tons of tables to support a query

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Creating tons of tables to support a query
Дата
Msg-id 20020909010206.GA28109@wolff.to
обсуждение исходный текст
Ответ на Re: Creating tons of tables to support a query  (Jan Ploski <jpljpl@gmx.de>)
Список pgsql-general
On Mon, Sep 09, 2002 at 01:54:08 +0200,
  Jan Ploski <jpljpl@gmx.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.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Nathan Hopper"
Дата:
Сообщение: Using the right tool
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Australian Open Source Awards