Re: why group expressions cause query to run forever

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux