Re: [ADMIN] tuning SQL

2002-03-13 Thread Bob Hairgrove
On Tue, 29 Jan 2002 17:45:34 + (UTC), [EMAIL PROTECTED] ("Zhang, Anna") wrote: >Thanks Peter Darley, Ross J. Reedstrom and Tom lane!! >How silly am I! Your messages reminds me. Actually I want to insert rows of >contact_discard table which are not exists in contact table to contact table >(so

[azhang@verisign.com: RE: [ADMIN] tuning SQL]

2002-01-29 Thread Ross J. Reedstrom
Just to complete the thread. Ross - Forwarded message from "Zhang, Anna" <[EMAIL PROTECTED]> - From: "Zhang, Anna" <[EMAIL PROTECTED]> To: "'Ross J. Reedstrom'" <[EMAIL PROTECTED]> Subject: RE: [ADMIN] tuning SQL Date: Tue,

Re: [ADMIN] tuning SQL

2002-01-29 Thread Ross J. Reedstrom
On Tue, Jan 29, 2002 at 12:23:17PM -0500, Zhang, Anna wrote: > Thanks Peter Darley, Ross J. Reedstrom and Tom lane!! > How silly am I! Your messages reminds me. Actually I want to insert rows of > contact_discard table which are not exists in contact table to contact table > (some duplicates in tw

Re: [ADMIN] tuning SQL

2002-01-29 Thread Zhang, Anna
takes only a few minues. Thanks! Anna Zhang -Original Message- From: Ross J. Reedstrom [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 11:39 AM To: Zhang, Anna Cc: [EMAIL PROTECTED] Subject: Re: [ADMIN] tuning SQL On Tue, Jan 29, 2002 at 10:57:01AM -0500, Zhang, Anna wrote

Re: [ADMIN] tuning SQL

2002-01-29 Thread Tom Lane
"Zhang, Anna" <[EMAIL PROTECTED]> writes: > select count(*) from contact a, contact_discard b where a.contacthandle <> > b.contacthandle; Did you really mean "<>" here? If so, the plan you showed us is not for this query. The above query is going to take approximately forever to execute :-( I

Re: [ADMIN] tuning SQL

2002-01-29 Thread Ross J. Reedstrom
On Tue, Jan 29, 2002 at 10:57:01AM -0500, Zhang, Anna wrote: > Hi, > I am running a query on postgres 7.1.3 at Red Hat 7.2 (2 CPUs, 1.5G RAM, 2 > drive disk array). > select count(*) from contact a, contact_discard b where a.contacthandle <> > b.contacthandle; What are you trying to do with th

Re: [ADMIN] tuning SQL

2002-01-29 Thread Peter Darley
ter than your first query), since it's using in, but I'm sure that someone can suggest something faster. Thanks, Peter Darley -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Zhang, Anna Sent: Tuesday, January 29, 2002 7:57 AM To: [EMAIL PROTECTE

[ADMIN] tuning SQL

2002-01-29 Thread Zhang, Anna
Hi, I am running a query on postgres 7.1.3 at Red Hat 7.2 (2 CPUs, 1.5G RAM, 2 drive disk array). select count(*) from contact a, contact_discard b where a.contacthandle <> b.contacthandle; Table contact has over 9 million rows, contact_diacard has around 259,000 rows, both tables define contac