pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Justin Graf <justin@magwerks.com>
To: pgsql-general@postgresql.org, "Satish Burnwal (sburnwal)" <sburnwal@cisco.com>
To: Bill Moran <wmoran@potentialtech.com>
Subject: Re: Query is stuck
Date: Wed, 14 Apr 2010 09:47:05 -0400
Message-ID: <4BC5C759.40403@magwerks.com> (raw )
In-Reply-To: <3A8C969225424C4D8E6BEE65ED8552DA0119F417@XMB-BGL-41C.cisco.com >
References: <3A8C969225424C4D8E6BEE65ED8552DA0119F188@XMB-BGL-41C.c?= =?utf-8?Q?isco.com >
<o2ne4edc9361004130603r9acb3257yb800890f447eb2ce@mail.gma?= =?utf-8?Q?il.com >
<20100413091248.a295737b.wmoran@potentialtech.com >
<3A8C9692?= =?utf-8?Q?25424C4D8E6BEE65ED8552DA0119F1AD@XMB-BGL-41C.cisco.com >
<6013c776bd?= =?utf-8?Q?38b7738ff9e43815ce8adc@mail.gransy.com >
<3A8C969225424C4D8E6BEE65ED?= =?utf-8?Q?8552DA0119F3EE@XMB-BGL-41C.cisco.com >
<20100414083622.dcf54d70.w?= =?utf-8?Q?moran@potentialtech.com >
<3A8C969225424C4D8E6BEE65ED8552DA0119F4?= =?utf-8?Q?17@XMB-BGL-41C.cisco.com >
On 4/14/2010 9:20 AM, Satish Burnwal (sburnwal) wrote:
> Index Scan using repcopy_index on repcopy a (cost=0.00..87824607.17
> *rows=28* width=142) (actual time=11773.105..689111.440*rows=1* loops=1)
> Index Cond: ((dm_user)::text = 'u3'::text)
> Filter: ((report_status = 0) AND (report_time = (subplan)))
> SubPlan
> -> Aggregate (cost=3531.30..3531.31 rows=1 width=8) (actual
> time=58.447..58.448 rows=1 loops=11788)
> -> Index Scan using repcopy_index on repcopy b
> (cost=0.00..3526.30*rows=2000* width=8) (actual time=0.017..36.779
> *rows=25842* loops=11788)
> Index Cond: ((($0)::text = (dm_user)::text) AND
> (($1)::text = (dm_ip)::text))
> Filter: ((ss_key)::text<> ''::text)
> Total runtime: 689111.511 ms
> (9 rows)
>
The estimated cost and actual are way off. Have you run Analyze on the
table
you may want to change the statistics collected for this table
http://www.postgresql.org/docs/8.1/static/planner-stats.html
ALTER [ COLUMN ]/column/ SET STATISTICS/integer/
http://www.postgresql.org/docs/8.1/static/sql-altertable.html
All legitimate Magwerks Corporation quotations are sent in a .PDF file attachment with a unique ID number generated by our proprietary quotation system. Quotations received via any other form of communication will not be honored.
CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally privileged, confidential or other information proprietary to Magwerks Corporation and is intended solely for the use of the individual to whom it addresses. If the reader of this e-mail is not the intended recipient or authorized agent, the reader is hereby notified that any unauthorized viewing, dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and destroy all occurrences of this e-mail immediately.
Thank you.
view thread (22+ messages) latest in thread
Message-ID: <4BC5C759.40403@magwerks.com>
Permalink: ../4BC5C759.40403@magwerks.com/
Also on: postgresql.org/message-id/4BC5C759.40403@magwerks.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: justin@magwerks.com, sburnwal@cisco.com, wmoran@potentialtech.com
Subject: Re: Query is stuck
In-Reply-To: <4BC5C759.40403@magwerks.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox