Oracle DATE索引 [英] Oracle DATE Index

查看:323
本文介绍了Oracle DATE索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

显然,如果列有一些不同的值,索引就可以正常工作。

Obviously, an index would work well if a column has a few distinct values.

在几乎每个条目都是唯一的列上创建索引会有效(例如created_on(DATE)列)?

Will creating an index on a column where nearly every entry is unique be effective (such as a created_on (DATE) column)?

推荐答案

基本上,如果你是的话,你应该索引几乎唯一的列需要查询有问题的列。如果没有索引,则需要进行全表扫描(检查所有行)。之前已经提出过这个问题,所以请参阅:几乎所有的字段都应该有索引

Basically, you should index also columns that are "nearly unique" if you need to query the column in question. Without the index, full table scans (checking all rows) are needed. This has been asked before, so for a longer explanation, please see: should nearly unique fields have indexes

这篇关于Oracle DATE索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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