哪些数据库可以创建基于函数的索引? [英] Which databases can create function-based indexes?

查看:148
本文介绍了哪些数据库可以创建基于函数的索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,这种类型的索引存在于Oracle中。 MySQL上的旧版本无法创建基于函数的索引(谢谢,谷歌)。和新版本?如何使用PostgreSQL,SQL Server等?

I know, that this type of indexes exist in Oracle. Old versions on MySQL can not create function-based indexes (thanks, google). And new versions? How about PostgreSQL, SQL Server etc?

推荐答案

我不知道oracle的内部细节,但是postgres可以在表达式上创建索引,这可以是一个函数,来自

I don't know inner details of oracle's, but postgres can create index on expression, which can be a function, from :


索引字段可以是表格
,根据表格行的一个或多个b $ b多列的值计算得出。这个
功能可用于根据基本数据的某些
转换获得快速的
数据访问。对于
示例,在
upper(col)上计算的索引将允许子句
WHERE upper(col)='JIM'使用
索引。

An index field can be an expression computed from the values of one or more columns of the table row. This feature can be used to obtain fast access to data based on some transformation of the basic data. For example, an index computed on upper(col) would allow the clause WHERE upper(col) = 'JIM' to use an index.

编辑:
MySQL似乎还在伪造这个,请参阅虚拟列了解详细信息。还有一些讨论这里。看起来不太活跃。

MySQL seems to still be forging this, see virtual columns for details. Also some discussions here. Don't seem very active.

DB2做

MS SQL不能这样做,但是使用计算列可以产生类似的效果;请参阅讨论

MS SQL can not do it, but using computed columns you can have similar effects; see discussion.

这篇关于哪些数据库可以创建基于函数的索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆