English 中文(简体)
履历
原标题:
  • 时间:2009-05-28 04:22:55
  •  标签:

我们的表格称为table1

(c1 int indentity,c2 datetime not null,c3 varchar(50) not null,
   c4 varchar(50) not null,c5 int not null,c6 int ,c7 int)

on column c1 is primary key(clusterd Index)
on column c2 is index_2(Nonclusterd) 
on column c3 is index_2(Nonclusterd)
on column c4 is index_2(Nonclusterd)
on column c5 is index_2(Nonclusterd)

报告载有1 000万份记录。 我们有几个程序指出“表1”有不同的搜索标准:

select from table1 where c1=blah..and c2= blah.. and c3=blah..
select from table1 where c2=blah..and c3= blah.. and c4=blah..
select from table1 where c1=blah..and c3= blah.. and c5=blah..
select from table1 where c1=blah..
select from table1 where c2=blah..
select from table1 where c3=blah..
select from table1 where c4=blah..
select from table1 where c5=blah..

除了上述之外,制定非分类指数或修改现有指数以取得良好指数业绩和缩短执行时间的最佳途径是什么?

最佳回答

现在是实际反应......

这里的陷阱是,你对任何一栏和复合一栏进行单体检查。 你们需要了解上述问题的执行频率——对于很少处理的人来说,你或许应该将这些问题排除在你的指数考虑之外。

<may> 可在所查询的每个栏目上更好地设立单一的NCIX。 如果退款的数目很小,因为NCIX能够处理“单头看”查询和综合调查,情况很可能如此。 或者,除了<><>>m”外,你还可以设立单一栏目NCIX,涵盖复合指数,决定因素是执行频率和返还结果数目。

问题回答

仅回答你提供的信息就有些困难。 还有其他因素需要权衡。

For example: How often is the table updated and what columns are updated frequently? You ll be paying a cost on these updates due to index maintenance.

What is the cardinality of your different columns? What queries are you executing most often and what columns appear in the where clause of those queries?

你们首先需要说明你们的每一项问询和工作所具备的可接受业绩参数,同时考虑到我上述内容。

有了1 000万分之四的分行,您的分治在这里可以产生许多意义。

您是否考虑使用国家抽样调查局的全文检索部分。 它可能提供你所期待的绩效?





相关问题
热门标签