Re: [HACKERS] GROUP BY / ORDER BY string is very slow - Mailing list pgsql-hackers

From Oleg Broytmann
Subject Re: [HACKERS] GROUP BY / ORDER BY string is very slow
Date
Msg-id Pine.SOL2.3.96.SK.990122123857.20737A-100000@sun.med.ru
Whole thread Raw
In response to Re: [HACKERS] GROUP BY / ORDER BY string is very slow  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Hello!

On Fri, 22 Jan 1999, Thomas G. Lockhart wrote:

> > Once a month I run a very simple script to put WWW logs into the 
> > table.
> > What is worse is spped of my queries.
> > Why is it so slow? How can I speed it up?
> 
> Are you running vacuum after removing your indices? If you don't then
> the table storage area does not actually shrink.
  Yes, I did a dozen of experiments, running VACUUM with and without
indices. VACUUM helped a bit, but not much...

> > I am running postgres compiled with --enable-locale. that is, for 
> > every string comparision there are 2 (two) malloc calls and one 
> > strcoll. Can I increase speed turning strcoll off? If so, postgres 
> > need a SET command to turn localization temporary off.
> 
> How can you "turn localization off" if you have localized strings in
> your database? If you build indices without localization, then turn
> localization back on, the things are probably hopelessly out of order.
  What are "localized strings"?  In this particular database there are only strings from WWW-log. If I
could turn localization off, I would turn it off for this entire db
forever.

> Is the Right Way to implement the NATIONAL CHARACTER type rather than
> having the CHAR type be localized? That way, you could have both types
> in the same database. Or is that SQL92 feature not widely used or
> useful?
  In this particular case NATIONAL CHARACTER (actually, non-NATIONAL
CHARACTER) is a solution. Not sure about other cases.

Oleg.
----    Oleg Broytmann  National Research Surgery Centre  http://sun.med.ru/~phd/          Programmers don't die, they
justGOSUB without RETURN.
 



pgsql-hackers by date:

Previous
From: Walter van der Schee
Date:
Subject: Re: What is MVCC?
Next
From: "D'Arcy" "J.M." Cain
Date:
Subject: getcwd failing suddenly