From: Andrus <eetasoft@online.ee>
To: pgsql-performance@postgresql.org
Subject: Re: why group expressions cause query to run forever
Date: Mon, 26 Jun 2006 11:48:47 +0300
Message-ID: <e7o71q$2hqq$1@news.hub.org> (raw)
References: <e7en5r$gm1$1@news.hub.org>
<2851.1151004624@sss.pgh.pa.us>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: eetasoft@online.ee
Subject: Re: why group expressions cause query to run forever
In-Reply-To: <e7o71q$2hqq$1@news.hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox