Re: HELP speed up my Postgres

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: HELP speed up my Postgres
Дата
Msg-id 41A58473.5020106@familyhealth.com.au
обсуждение исходный текст
Ответ на HELP speed up my Postgres  (JM <jerome@gmanmi.tv>)
Ответы Re: [GENERAL] HELP speed up my Postgres  (Jerome Macaranas <jerome@gmanmi.tv>)
Список pgsql-performance
>         update SUBSCRIPTIONTABLE set ACTIVEFLAG='Y' where mobile_num in (select
> mobile_num from LOADED_MOBILE_NUMBERS)

Change to:

update SUBSCRIPTIONTABLE set ACTIVEFLAG='Y' where exists (select 1 from
LOADED_MOBILE_NUMBERS lmn where
lmn.mobile_num=SUBSCRIPTIONTABLE.mobile_num);

That should run a lot faster.

Make sure you have indexes on both mobile_num columns.

Chris

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

Предыдущее
От: Klint Gore
Дата:
Сообщение: Re: HELP speed up my Postgres
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Postgres vs. MySQL