Re: why group expressions cause query to run forever

From: "Andrus" <eetasoft(at)online(dot)ee>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: why group expressions cause query to run forever
Date: 2006-06-26 08:48:47
Message-ID: e7o71q$2hqq$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Riggs 2006-06-26 19:33:34 Re: Some performance numbers, with thoughts
Previous Message luchot 2006-06-26 08:07:05 Re: Occupation bloc in pages of table