Re: No Index-Only Scan on Partial Index
От | Merlin Moncure |
---|---|
Тема | Re: No Index-Only Scan on Partial Index |
Дата | |
Msg-id | CAHyXU0xJPwqtBsz1tPKkNuyWgKOq7EJhNUUtzX1U81B8e+oqdw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: No Index-Only Scan on Partial Index ("David E. Wheeler" <david@justatheory.com>) |
Ответы |
Re: No Index-Only Scan on Partial Index
|
Список | pgsql-hackers |
On Tuesday, October 1, 2013, David E. Wheeler <<a href="mailto:david@justatheory.com">david@justatheory.com</a>> wrote:<br/>> On Oct 1, 2013, at 3:56 PM, Merlin Moncure <<a href="mailto:mmoncure@gmail.com">mmoncure@gmail.com</a>>wrote:<br /> ><br />>> I don't think it has anythingto do with the conditional index -- it's<br />>> the functional based. For some reason postgres always wantsto post<br />>> filter (note the filter step below):<br /> >><br />>> postgres=# create index on try(upper_inf(irange));<br/>>> CREATE INDEX<br />>> Time: 12.001 ms<br />>> postgres=# explain select *from try where upper_inf(irange);<br />>> QUERY PLAN<br /> >> -------------------------------------------------------------------------------<br/>>> Index Scan using try_upper_inf_idxon try (cost=0.00..9.25 rows=33 width=40)<br />>> Index Cond: (upper_inf(irange) = true)<br />>> Filter: upper_inf(irange)<br />><br />> Hrm. I get a seq scan for that query:<br />><br />> createindex on try(upper_inf(irange));<br />> explain select * from try where upper_inf(irange);<br />> QUERY PLAN<br /> > -----------------------------------------------------------<br />> Seq Scan on try (cost=0.00..1887.00 rows=33333 width=68)<br />> Filter: upper_inf(irange)<br />><br />> True also if I justselect the irange. Is the filter the issue, here?<br /><br />Turn off seq scan...<br /><br />merlin
В списке pgsql-hackers по дате отправления: