Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SQL Server负担得起多少数据?_Sql_Sql Server_Database_Relational Database - Fatal编程技术网

SQL Server负担得起多少数据?

SQL Server负担得起多少数据?,sql,sql-server,database,relational-database,Sql,Sql Server,Database,Relational Database,DB:SQL Server 2014标准或更高版本 服务器:MS Azure,无限制的CPU和RAM 我们想要设计新的后端架构,我们在一个表中有大约2000万个,SQL可能会像: select * from xxxx where (type=1 or type=2 or type=3) and someNumber<5000 order by xxxxxx 从xxxx中选择* 其中(type=1或type=2或type=3)和someNumber可以更容易地写成: select * fr

DB:SQL Server 2014标准或更高版本

服务器:MS Azure,无限制的CPU和RAM

我们想要设计新的后端架构,我们在一个表中有大约2000万个,SQL可能会像:

select * from xxxx
where (type=1 or type=2 or type=3) and someNumber<5000
order by xxxxxx
从xxxx中选择*

其中(type=1或type=2或type=3)和someNumber可以更容易地写成:

select *
from xxxx
where type in (1, 2, 3) and someNumber < 5000
order by xxxxxx;

SQLAzure应该对您有好处。我在SQL Azure上有数据库,在一个表中有超过2.5亿条记录,这是一个标准的2层数据库,成本不太高。如果你有很好的索引和简单的查询,它会很好的工作。最终,您应该创建一个数据库并尝试一下

您还可以使用表分区,这有助于提高这样一个大型表的性能和管理


在Stackify,我们为我们的多租户SaaS产品在SQL Azure上管理1000多个数据库

这取决于查询数据的方式以及创建的索引。散列索引查找应该可以轻松处理1亿行,而排序操作将花费很长时间,除非您已经为该特定排序排序建立了排序树索引。
select *
from ((select * from xxxx where type = 1 and somenumber < 5000) union all
      (select * from xxxx where type = 2 and somenumber < 5000) union all
      (select * from xxxx where type = 2 and somenumber < 5000)
     ) x
order by xxxxxx;