Re: Some frustrations with admin tasks on PGSQL database

Поиск
Список
Период
Сортировка
От Phoenix Kiula
Тема Re: Some frustrations with admin tasks on PGSQL database
Дата
Msg-id e373d31e0708170722s406cd82ancc6b6b36990f258c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Some frustrations with admin tasks on PGSQL database  (hubert depesz lubaczewski <depesz@depesz.com>)
Ответы Re: Some frustrations with admin tasks on PGSQL database
Список pgsql-general
On 17/08/07, hubert depesz lubaczewski <depesz@depesz.com> wrote:
> On Fri, Aug 17, 2007 at 07:49:08PM +0800, Phoenix Kiula wrote:
> > I have dropped all indexes/indicises on my table, except for the
> > primary key. Still, when I run the query:
> >     UPDATE mytable SET mycolumn = lower(mycolumn);
>
> can you please check this:
>
> select count(*) from mytable;
> select count(*) from mytable where mycolumn ~ '[A-Z]';
>
> and if the second is lower than first make the update:
> update mytable set mycolumn = lower(mycolumn) where mycolumn ~ '[A-Z]';
>
> of course if your data contain national characters you have to include
> them (upper case only) in this regexp.


Wow, smartest advice of the day! Yes, a lot of our data in that column
has dots and numbers (800,000 compared to 6 million), so I wanted to
get only to the stuff that was pure alphabets, but just didn't think
of how.

[Slithers away to get dunce cap].

Thanks much!

В списке pgsql-general по дате отправления:

Предыдущее
От: "Sander Steffann"
Дата:
Сообщение: Re: PostgreSQL clustering (shared disk)
Следующее
От: hubert depesz lubaczewski
Дата:
Сообщение: Re: Some frustrations with admin tasks on PGSQL database