| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: many 'OR' in WHERE-condition |
| Date: | 2007-04-20 12:20:16 |
| Message-ID: | 20070420122016.GF15322@a-kretschmer.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
am Fri, dem 20.04.2007, um 12:59:01 +0100 mailte Richard Huxton folgendes:
> A. Kretschmer wrote:
> >
> >It's not my problem - i found it in a forum (german)
> >http://pg-forum.de/showthread.php?t=1332
> >
> >If the list contains up to 195 entrys -> up to 195 bitmap index scans
> >and BitmapOr -> 7.839ms
> >
> >If the list contains 196 entrys -> seq-scan -> 5591.567ms
>
> It looks like it's getting the row estimate badly wrong.
>
> "Seq Scan on t_datasets_searchindices_rel (cost=0.00..129053.50
> rows=159277 width=4) (actual time=0.213..5590.435 rows=325 loops=1)
Uh oh, i have overlook this.
>
> Probably worth increasing the statistics estimate for that column (ALTER
> TABLE ... ALTER COLUMN ... SET STATISTICS=N)
Thx for your hints!
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bart Degryse | 2007-04-20 12:29:07 | Re: Retrieve month from date |
| Previous Message | Rohit Khare | 2007-04-20 12:19:33 | Retrieve month from date |