Re: [GENERAL] Expensive query

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: [GENERAL] Expensive query
Дата
Msg-id 4.1.19981030151737.00a1c920@exchange.postdirect.com
обсуждение исходный текст
Ответ на Expensive query  (Christophe Pettus <pettus@postdirect.com>)
Ответы Re: [GENERAL] Expensive query  (dustin sallings <dustin@spy.net>)
Список pgsql-general
At 02:13 PM 10/30/98 , you wrote:
>    That users table looks kinda useless.  I'd recommend changing id
>to name and making id an int, then putting your events users in as ints.
>Currently, it doesn't do anything at all, and you might as well be doing
>this query [...]

Actually, the real-life 'users' table has lots of fields, none of them
relevant to the question at hand.

>    I would also recommend not making code a char(10).  If you put an
>index on code and an index on date, you should be able to get your results
>pretty quick.

They are indexed.

Using ints is not unreasonable, but does not explain the pathological behavior.

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

Предыдущее
От: Adam Miller
Дата:
Сообщение: thrashing like a beached shark
Следующее
От: Mike Meyer
Дата:
Сообщение: Re: [GENERAL] Problem with aggregates and group by