From: | Justin Graf <justin(at)magwerks(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org, "Satish Burnwal (sburnwal)" <sburnwal(at)cisco(dot)com>, Bill Moran <wmoran(at)potentialtech(dot)com> |
Subject: | Re: Query is stuck |
Date: | 2010-04-14 13:47:05 |
Message-ID: | 4BC5C759.40403@magwerks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-general |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Graf | 2010-04-14 14:05:17 | Re: Query is stuck |
Previous Message | Bill Moran | 2010-04-14 13:42:03 | Re: Query is stuck |
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2010-04-14 13:51:52 | Re: [BUGS] Can you please let me know? |
Previous Message | Kevin Grittner | 2010-04-14 13:45:18 | Re: Can you please let me know? |