Re: why group expressions cause query to run forever

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: why group expressions cause query to run forever
Дата
Msg-id e7o71q$2hqq$1@news.hub.org
обсуждение исходный текст
Ответ на why group expressions cause query to run forever  ("Andrus" <eetasoft@online.ee>)
Список pgsql-performance
Tom,

thank you.

> I think the problem is probably that you're sorting two dozen CHAR
> columns, and that in many of the rows all these entries are '' forcing
> the sort code to compare all two dozen columns (not so)?  So the sort
> ends up doing lots and lots and lots of CHAR comparisons.  Which can
> be slow, especially in non-C locales.  What's your locale setting?

show all returns

"lc_collate";"en_US.UTF-8"
"lc_ctype";"en_US.UTF-8"
"lc_messages";"C"
"lc_monetary";"et_EE.utf-8"
"lc_numeric";"et_EE.utf-8"
"lc_time";"et_EE.utf-8"

How to speed up this  query ?
Is it possible to force the binary comparison for grouping ?
Should I concatenate all the char columns into single column ?

Andrus.




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

Предыдущее
От: luchot
Дата:
Сообщение: Re: Occupation bloc in pages of table
Следующее
От: luchot
Дата:
Сообщение: Re: Occupation bloc in pages of table