Re: Understanding how partial indexes work?
| От | Tom Lane |
|---|---|
| Тема | Re: Understanding how partial indexes work? |
| Дата | |
| Msg-id | 4971.1196987547@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Understanding how partial indexes work? ("Chris Velevitch" <chris.velevitch@gmail.com>) |
| Список | pgsql-general |
"Chris Velevitch" <chris.velevitch@gmail.com> writes:
> On Dec 7, 2007 2:39 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Is it worth the trouble? You didn't mention the statistics involved,
>> but ordinarily I'd think a non-equal condition is too nonselective
>> to justify the cost of maintaining an extra index.
> Yes, I did neglect to mention the stats. Y is the status of the record
> which represents the life cycle of the record starting at zero and
> ending up at k3. So basically the query would retrieving and the
> partial index will indexing records which aren't at their end of life.
> So the number of records where Y <> k3 will be low and the number of
> records where Y = k3 will be growing over time.
OK, in that case the partial index might be worth trying.
regards, tom lane
В списке pgsql-general по дате отправления: