Re: slow full table update

From: "Vladimir Sitnikov" <sitnikov(dot)vladimir(at)gmail(dot)com>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: firerox(at)centrum(dot)cz, tv(at)fuzzy(dot)cz, pgsql-performance(at)postgresql(dot)org
Subject: Re: slow full table update
Date: 2008-11-12 17:58:35
Message-ID: 1d709ecc0811120958k5be6235vc3dbeb6fb58f4a68@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> >
> > 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrus 2008-11-12 18:06:47 Re: Increasing select max(datecol) from bilkaib where datecol<=date'2008-11-01' and (cr='00' or db='00') speed
Previous Message Richard Huxton 2008-11-12 17:45:55 Re: slow full table update