需要重建索引吗? [英] Need rebuild index?

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

问题描述

我正在使用azure数据仓库.

I am using azure data warehouse.

是否需要重建/重组用于碎片的索引?

Need I rebuild/reorganize index for fragmentation?

还是只有 update statistic is足够?

推荐答案

我认为您需要同时执行这两个操作.

I think you need to do both of them.

第一次编制索引与统计信息大不相同

First Indexing is quite different from Statistic

索引存储实际数据(数据页或索引页,取决于我们正在讨论的索引类型).

Indexes store actual data (data pages or index pages depending on the type of index we are talking about).

统计信息存储数据分布,它更像是一个优化器,它比较各种查询计划的成本,然后选择成本最低的计划,这在大多数情况下是执行速度最快的计划.

Statistics store data distribution.It's more like a optimizer.It compares the cost of various query plans, and then chooses the plan with the lowest cost, which is in most cases the plan that executes the fastest.

CREATE INDEX是创建索引(聚集,非聚集等)的DDL,而CREATE STATISTICS是创建表中各列统计信息的DDL.

CREATE INDEX will be the DDL to create an index (clustered, nonclustered, etc.) and CREATE STATISTICS is the DDL to create the statistics on columns within the table.

在此处阅读有关的更多信息 索引和统计信息

Read here to get more some idea about Index and Statistic

阅读有关Azure的内容SQL Dataware最佳做法 


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

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