| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | firerox(at)centrum(dot)cz |
| Cc: | tv(at)fuzzy(dot)cz, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: slow full table update |
| Date: | 2008-11-12 17:45:55 |
| Message-ID: | 491B1653.3040600@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
firerox(at)centrum(dot)cz wrote:
> Hi,
>
> I've changed settings,
> but with no effect on speed.
>
> I try explain query with this result
> for 10.000 rows > update songs set views = 0 where sid > 20000 and sid < 30000
>
> Bitmap Heap Scan on songs (cost=151.59..6814.29 rows=8931 width=526) (actual time=4.848..167.855 rows=8945 loops=1)
This query says t is taking 167 milli-seconds, not 10 minutes as your
first message said. Is this query actually slow?
>
> Recheck Cond: ((sid > 20000) AND (sid < 30000))
>
> -> Bitmap Index Scan on pk_songs2 (cost=0.00..151.59 rows=8931 width=0) (actual time=4.071..4.071 rows=9579 loops=1)
>
> Index Cond: ((sid > 20000) AND (sid < 30000))
>
> Is there a way to run this query on sigle throughpass with no Recheck Cond?
Only a sequential scan.
--
Richard Huxton
Archonet Ltd
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vladimir Sitnikov | 2008-11-12 17:58:35 | Re: slow full table update |
| Previous Message | Matthew Wakeling | 2008-11-12 17:33:41 | Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed |