pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: firerox@centrum.cz
Cc: tv@fuzzy.cz
Cc: pgsql-performance@postgresql.org
Subject: Re: slow full table update
Date: Wed, 12 Nov 2008 17:45:55 +0000
Message-ID: <491B1653.3040600@archonet.com> (raw)
In-Reply-To: <200811121825.26487@centrum.cz>
References: <200811101729.14977@centrum.cz>
	<200811101730.11057@centrum.cz>
	<200811101730.15902@centrum.cz>
	<61593.89.102.139.23.1226335300.squirrel@sq.gransy.com>
	<200811121725.30238@centrum.cz>
	<63509.89.102.139.23.1226508479.squirrel@sq.gransy.com>
	<200811121825.26487@centrum.cz>

firerox@centrum.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



view thread (14+ messages)  latest in thread

Message-ID: <491B1653.3040600@archonet.com>
Permalink:  ../491B1653.3040600@archonet.com/
Also on:    postgresql.org/message-id/491B1653.3040600@archonet.com

 · 

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-performance@postgresql.org
  Cc: dev@archonet.com, firerox@centrum.cz, tv@fuzzy.cz
  Subject: Re: slow full table update
  In-Reply-To: <491B1653.3040600@archonet.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