Re: many 'OR' in WHERE-condition
От | Richard Huxton |
---|---|
Тема | Re: many 'OR' in WHERE-condition |
Дата | |
Msg-id | 4628AB05.6000400@archonet.com обсуждение исходный текст |
Ответ на | Re: many 'OR' in WHERE-condition ("A. Kretschmer" <andreas.kretschmer@schollglas.com>) |
Ответы |
Re: many 'OR' in WHERE-condition
|
Список | pgsql-sql |
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) Probably worth increasing the statistics estimate for that column (ALTER TABLE ... ALTER COLUMN ... SET STATISTICS=N) It also looks like it's getting the cost estimates badly wrong. Probably worth asking the original poster to read the tuning guide. -- Richard Huxton Archonet Ltd
В списке pgsql-sql по дате отправления: