Skip site navigation (1) Skip section navigation (2)

Re: [PERFORM] HELP speed up my Postgres

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: jerome(at)gmanmi(dot)tv
Cc: pgsql-performance(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [PERFORM] HELP speed up my Postgres
Date: 2004-11-25 07:06:27
Message-ID: 41A58473.5020106@familyhealth.com.au (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-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

In response to

Responses

pgsql-performance by date

Next:From: Klint GoreDate: 2004-11-25 07:08:30
Subject: Re: [PERFORM] HELP speed up my Postgres
Previous:From: Tom LaneDate: 2004-11-25 06:55:25
Subject: Re: [PERFORM] HELP speed up my Postgres

pgsql-general by date

Next:From: Klint GoreDate: 2004-11-25 07:08:30
Subject: Re: [PERFORM] HELP speed up my Postgres
Previous:From: Tom LaneDate: 2004-11-25 06:55:25
Subject: Re: [PERFORM] HELP speed up my Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group