Re: Creating tons of tables to support a query

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Creating tons of tables to support a query
Дата
Msg-id 20020909093617.A9934@svana.org
обсуждение исходный текст
Ответ на Creating tons of tables to support a query  (Jan Ploski <jpljpl@gmx.de>)
Список pgsql-general
On Sun, Sep 08, 2002 at 11:58:44PM +0200, Jan Ploski wrote:
> Hello,
>
> I am in particular wondering, why an index on message(sectionID, dateSent)
> does not make these queries comparably fast:
>
>     select msgnum from message where
>         sectionID = ? and
>         dateSent > ?
>         order by dateSent
>         limit 1;
>
>     select msgnum from scnt_9 where
>         dateSent > ?
>         order by dateSent
>         limit 1;
>
> (scnt_9 is a lookup table which only creates msgnums for messages
> with sectionID == 9)
>

Can you send the results of EXPLAIN ANALYZE for both those queries. Thanks.

--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

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

Предыдущее
От: Jan Ploski
Дата:
Сообщение: Creating tons of tables to support a query
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Creating tons of tables to support a query