pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
To: Richard Huxton <dev@archonet.com>
Cc: firerox@centrum.cz
Cc: tv@fuzzy.cz
Cc: pgsql-performance@postgresql.org
Subject: Re: slow full table update
Date: Wed, 12 Nov 2008 09:58:35 -0800
Message-ID: <1d709ecc0811120958k5be6235vc3dbeb6fb58f4a68@mail.gmail.com> (raw)
In-Reply-To: <491B1653.3040600@archonet.com>
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>
	<491B1653.3040600@archonet.com>

> >
> >   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?
>
> "Recheck Cond" is somewhat misleading here.

Bitmap Index Scan has almost void "recheck" impact in case the whole bitmap
fits in work_mem. That means bitmap scan degrades when the number of rows in
table (not the total number of returned rows) is greater than
work_mem*1024*8. 60'000 rows bitmap scan will require 60'000/8=7'500 bytes ~
8Kbytes of memory to run without additional recheck, thus I do not believe
it hurts you in this particular case


Regards,
Vladimir Sitnikov

view thread (14+ messages)  latest in thread

Message-ID: <1d709ecc0811120958k5be6235vc3dbeb6fb58f4a68@mail.gmail.com>
Permalink:  ../1d709ecc0811120958k5be6235vc3dbeb6fb58f4a68@mail.gmail.com/
Also on:    postgresql.org/message-id/1d709ecc0811120958k5be6235vc3dbeb6fb58f4a68@mail.gmail.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: sitnikov.vladimir@gmail.com, dev@archonet.com, firerox@centrum.cz, tv@fuzzy.cz
  Subject: Re: slow full table update
  In-Reply-To: <1d709ecc0811120958k5be6235vc3dbeb6fb58f4a68@mail.gmail.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