Re: Index Scans become Seq Scans after VACUUM ANALYSE
От | Maarten.Boekhold@reuters.com |
---|---|
Тема | Re: Index Scans become Seq Scans after VACUUM ANALYSE |
Дата | |
Msg-id | T5a5a2f68b6c407b706700@reuters.com обсуждение исходный текст |
Ответ на | Index Scans become Seq Scans after VACUUM ANALYSE (Louis-David Mitterrand <vindex@apartia.org>) |
Список | pgsql-hackers |
<br /><font face="sans-serif" size="2">On 04/18/2002 12:41:15 PM tycho wrote:<br /> > > Don't know if the optimizertakes this into consideration, but a query that <br /> > uses a primary and/or unique key in the where-clause,should always choose to <br /> > use<br /> > > the related indices (assuming the table size is abovea certain threshold). <br /> > Since a primary key/unique index always restricts the resultset to a single <br />> row.....<br /> > <br /> > I don't think so.<br /> > <br /> > eg. table with primary key "pk", taking valuesfrom 1 to 1000000 (so<br /> > 1000000 records)<br /> > <br /> > select * from table where pk > 5<br />> <br /> > should probably not use the index ...<br /></font><br /><font face="sans-serif" size="2">Oops, you'reright of course. Rephrase the above as 'a query that uses a primary key to uniquely qualify a single row' (which prettymuch restricts it to the = operator with a constant). Still, this is probably a fairly common case.....</font><br /><br/><font face="sans-serif" size="2">Maarten</font><br /><font face="sans-serif" size="2"><br /> ----<br /><br /> MaartenBoekhold, maarten.boekhold@reuters.com<br /><br /> Reuters Consulting<br /> Dubai Media City<br /> Building 1, 5thFloor<br /> PO Box 1426<br /> Dubai, United Arab Emirates<br /> tel:+971(0)4 3918300 ext 249<br /> fax:+971(0)4 3918333<br/> mob:+971(0)505526539</font> <code><font size="3"><br /><br /> ----------------------------------------------------------------<br /> Visit our Internet site at http://www.reuters.com<br/><br /> Any views expressed in this message are those of the individual<br /> sender, except wherethe sender specifically states them to be<br /> the views of Reuters Ltd.<br /></font></code>
В списке pgsql-hackers по дате отправления: