Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 134BE6323EB for ; Wed, 14 Apr 2010 09:36:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43134-10 for ; Wed, 14 Apr 2010 12:36:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mail.postgresql.org (Postfix) with ESMTP id 9219B6323AD for ; Wed, 14 Apr 2010 09:36:26 -0300 (ADT) Received: from localhost (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id DE836F7419; Wed, 14 Apr 2010 08:36:23 -0400 (EDT) Date: Wed, 14 Apr 2010 08:36:22 -0400 From: Bill Moran To: "Satish Burnwal (sburnwal)" Cc: Subject: Re: Query is stuck Message-Id: <20100414083622.dcf54d70.wmoran@potentialtech.com> In-Reply-To: <3A8C969225424C4D8E6BEE65ED8552DA0119F3EE@XMB-BGL-41C.cisco.com> References: <3A8C969225424C4D8E6BEE65ED8552DA0119F188@XMB-BGL-41C.cisco.com> <20100413091248.a295737b.wmoran@potentialtech.com> <3A8C969225424C4D8E6BEE65ED8552DA0119F1AD@XMB-BGL-41C.cisco.com> <6013c776bd38b7738ff9e43815ce8adc@mail.gransy.com> <3A8C969225424C4D8E6BEE65ED8552DA0119F3EE@XMB-BGL-41C.cisco.com> Organization: Bill Moran X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.7; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/439 X-Sequence-Number: 161637 In response to "Satish Burnwal (sburnwal)" : > controlsmartdb=# \d repcopy; > Table "public.repcopy" > Column | Type | Modifiers > -----------------+--------------------------------+----------- > report_id | integer | not null > dm_ip | character varying(64) | > dm_mac | character varying(64) | > dm_user | character varying(255) | > dm_os | character varying(64) | > report_time | timestamp(0) without time zone | > sys_name | character varying(255) | > sys_user | character varying(255) | > sys_user_domain | character varying(255) | > ss_key | character varying(128) | > login_time | character varying(64) | > role_id | smallint | > new_vlan_id | character varying(64) | > report_status | smallint | > Indexes: > "repcopy_pk" PRIMARY KEY, btree (report_id) Unless you truncated this output, you _really_ need to add some indexes to this table. Read back through earlier messages in the thread for suggestions. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/