"weiping" <laserlist@pgsqldb.com> writes:
> -> Index Scan using urlusermaps_userid on wd_urlusermaps
> (cost=0.00..6750.55 rows=1094 width=4) (actual time=1.478..16.563 rows=41 loops=1)
> Index Cond: (userid = 219177)
> Filter: ("share" = 1)
It's estimating 1094 rows and getting 41 rows. You might considering raising
the statistics target for that table.
Does it get accurate estimates for the number of rows for each of these?
explain analyze select * from wd_urlusermaps where userid=219177
explain analyze select * from wd_urlusermaps where share=1
(the latter might take a while)
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера