数据库大小超过1TB并优化性能 [英] DB size is over 1TB and optimise performace

查看:138
本文介绍了数据库大小超过1TB并优化性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我们有生产数据库,很少有桌子长到800GB,600GB等。此时此刻 数据库有4个mdf文件,每个文件都有 大小限制。位于U上的所有数据文件:驱动器大小为2TB。  部分表格 大小超过300GB。没有文件组
已创建或启用。  我知道我们需要空间数据库 容纳数据 。没关系。但我的问题如下。

Hi We have production database and few table are grown up to 800GB, 600GB etc. At this moment  Database has 4 mdf files each has  size limit . All datafiles located on U:drive size 2TB.  Some of the tables  size over 300GB . no file group has been created or enabled.  I understand we need space DB  accommodate data  .That is fine. But My question around as follows.

1。如何使用多个数据文件优化数据分发的性能(我们是否需要规划数据库文件组?  IS是否意味着创建多个驱动器V:驱动器,X:驱动器,P:驱动器等以及在驱动器之间分配数据文件?

1. How to optimise performace over data distribution with multiple data files .(Do we need to plan DB filegroups? IS that mean create multiple drives V: drive, X:drive, P: drive etc and distribute datafiles across the drives?

2.要实现这一点,请创建新的数据库并备份和恢复  ?

2.To achieve this create fresh DB and backup and restore  ?

3.如果磁盘级存储 从同一卷分配?

3. Does it helpful much if the disk level storage allocated from same volume?

4.基于表格平均记录大小的新数据文件设计?

4.new data files design based on average records size on the tables ?

任何想法都非常感激。

问候

 

推荐答案

Hi ashwan,

 

> >如何使用多个数据文件优化数据分发的性能(我们是否需要规划数据库文件组?  IS意味着创建
多个驱动器V:驱动器,X:驱动器,P:驱动器等等 在驱动器上分发数据文件?

是的,您可以直接创建辅助数据文件并将它们保存在不同的磁盘上。为了最大限度地提高性能,请尽可能在不同的可用磁盘上创建文件或文件组。将与b $ b竞争的对象放在空间中在不同的文件组中。

Yes, you can create secondary data files directly and save them on different disks. To maximize performance, create files or filegroups on different available disks as possible. Put objects that compete heavily for space in different filegroups.

 

 

 

  你可以
创建第二个辅助文件的文件组,并使该文件组成为默认文件组。这样,主文件将只包含系统表和对象。

 

注意:请使用tsql修改默认文件组

Note: Please use tsql to modify the default file group

 

ALTER
数据库 MyDB
修改 FILEGROUP MyDB_FG1
DEFAULT ; GO

 

 

>>要实现此目的,请创建新数据库并备份和恢复  ?

 

不,这不是必需的。

 

>>如果从同一卷分配的磁盘级存储空间有用吗?

 

我建议您将数据文件存储在不同的物理磁盘上,并尝试将日志文件和数据文件保存在不同的位置。这样可以提高性能,因为并行磁盘I / O搜索
将提高数据搜索速度。

I recommend that you store the data files on different physical disks and try to keep the log files and data files in different locations. This will improve performance because parallel disk I/O search will increase data search speed.

 

>>根据表格上的平均记录大小设计新数据文件?

 

新数据文件基于您配置的初始化大小和增长模式。您可以通过以下链接找到文件和文件组的填充策略:

文件和文件组填充策略

The new data file is based on the initialization size and growth mode you configured. You can find the filling strategy for files and file groups through the links below: File and Filegroup Fill Strategy

 

有关详细信息,请参阅
https://docs.microsoft.com/en-us/sql/relational-databases/databases/database-files-and-filegroups?view=sql-server-2017

 

希望这可以帮到你。

最好的问候,

Dedmon Dai

Dedmon Dai


这篇关于数据库大小超过1TB并优化性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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