Re: Functional Indices
От | Peter Eisentraut |
---|---|
Тема | Re: Functional Indices |
Дата | |
Msg-id | Pine.LNX.4.30.0105222139510.757-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Functional Indices (kavoos <kavoos@issn.org>) |
Ответы |
Re: Estimating costs (was Functional Indices)
|
Список | pgsql-general |
kavoos writes: > create index lower_title on titles (lower(title)); > vacuum analyze; > ... > explain select * from titles where lower(title) = 'monde'; > Seq Scan on titles (cost=0.00..39392.10 rows=14145 width=44) > > Why it does not use the index ? The planner estimates that this query returns 14145 rows. If this is more than a small fraction of the rows in this table then a sequential scan is better than an index scan. The questions are, how many rows does this query really return, and how many rows are in this table. Btw., this is discussed in the manual under performance tips. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
В списке pgsql-general по дате отправления: