希望我能得到每个数据库服务器的答案。
有关索引工作原理的概述,请查看:How does database indexing work?
发布于 2008-08-04 11:25:14
以下是SQL92标准,因此大多数使用SQL的RDMBS都应该支持:
CREATE INDEX [index name] ON [table name] ( [column name] )
发布于 2008-08-13 14:05:27
Sql Server 2005
使您能够指定覆盖索引。这是一个包含来自叶级别其他列的数据的索引,因此您不必返回到表来获取索引键中未包含的列。
create nonclustered index my_idx on my_table (my_col1 asc, my_col2 asc) include (my_col3);
对于select列表中包含my_col3
,where子句中包含my_col1
和my_col2
的查询来说,这是非常有价值的。
发布于 2012-01-23 23:13:48
对于python pytables,索引没有名称,它们绑定到单个列:
tables.columns.column_name.createIndex()
https://stackoverflow.com/questions/1156
复制相似问题