From: | Oleg Broytmann <phd(at)sun(dot)med(dot)ru> |
---|---|
To: | "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] GROUP BY / ORDER BY string is very slow |
Date: | 1999-01-22 09:46:52 |
Message-ID: | Pine.SOL2.3.96.SK.990122123857.20737A-100000@sun.med.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 just GOSUB without RETURN.
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 1999-01-22 13:26:19 | getcwd failing suddenly |
Previous Message | Walter van der Schee | 1999-01-22 09:44:50 | Re: What is MVCC? |