Re: Expressional Indexes
От | Greg Stark |
---|---|
Тема | Re: Expressional Indexes |
Дата | |
Msg-id | 877k1w6fcv.fsf@stark.dyndns.tv обсуждение исходный текст |
Ответ на | Re: Expressional Indexes ("Randolf Richardson, DevNet SysOp 29" <rr@8x.ca>) |
Список | pgsql-sql |
"Randolf Richardson, DevNet SysOp 29" <rr@8x.ca> writes: > For example, if I want to index on a date field but only have the index > keep track of the most recent 30 days (and then create a secondary index for > all dates) so as to improve performance on more heavily loaded systems. > > Am I understanding this new terminology correctly? Thanks in advance. No, you could do the above using "partial indexes" but it wouldn't work very well in this case because the "last 30 days" keeps moving and you would have to keep redefining the index periodically. It also wouldn't really help performance. Expression Indexes are just more powerful "functional indexes". In 7.3 they could be used for indexing expressions like "lower(foo)". In 7.4 they're more powerful and you can index expressions other than simple function calls. They still should be things that always return the same value, which excludes subqueries. -- greg
В списке pgsql-sql по дате отправления: