Re: order of nested loop
От | Tom Lane |
---|---|
Тема | Re: order of nested loop |
Дата | |
Msg-id | 14685.1055876839@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: order of nested loop (Joseph Shraibman <jks@selectacast.net>) |
Ответы |
Re: order of nested loop
|
Список | pgsql-general |
Joseph Shraibman <jks@selectacast.net> writes: > => explain select * from usertable where podkey = 20; > Index Scan using usertable_podkey_key on usertable > (cost=0.00..16019.99 rows=5923 width=625) > => select count(*) from usertable where podkey = 20; > count > ------- > 3 > (1 row) Well, there's our problem :-( I would suggest bumping up the statistics target for usertable.podkey (see ALTER TABLE SET STATISTICS). Since it's only an int4 column you could make the target 100 (instead of the default 10) without much cost. That should give substantially finer-grain detail and hopefully bring this estimate down out of the stratosphere. Re-analyze the table and see what it gets you. regards, tom lane
В списке pgsql-general по дате отправления: