利用表分区的大数据库优化方法
2018-12-18高丽娟
高丽娟
摘要:与常规数据库相比,大数据库不仅仅是数据存储量巨大,每一个表结构记录的条数也更大,其对于系统管理、系统性能等提出了许多新的要求。为了对大数据表在查询过程中农工存在的延迟问题以及管理问题进行解决,可以将表分区方法引入其中。该文从表分区的原理出发,以SQL Server 2012为例,对大数据库优化中表分区的实现方法进行了研究和讨论,希望能够借此提升大数据库数据管理与查询的效率。
关键词:表分区;大数据库;优化
中图分类号:TP311 文献标识码:A 文章编号:1009-3044(2018)26-0018-02
Abstract: Compared with the conventional database, the large database is not only a huge amount of data storage, but also a larger number of records per table structure. It puts forward many new requirements for system management and system performance. In order to solve the delay problem and management problem of the agricultural workers in the query process of the big data table, the table partitioning method can be introduced. Based on the principle of table partitioning, this paper takes SQL Server 2012 as an example to study and discuss the implementation method of table partitioning in large database optimization, hoping to improve the efficiency of large database data management and query.
Key words: table partitioning; large database; optimization
大数据背景下,海量数据的存储与管理成为了人们关注的核心问题,一些大型数据库的存储量达到了TB甚至PB的级别,单个表格记录的数据可以达到数千万甚至上亿,这个数据还会随着数据库的更新而不断增加。在这样的背景下,数据库运行效率受到了很大影响,维护管理的难度也大大增加,想要对大数据库进行有效管理,可以将表分区的方法引入其中,针对大数据库进行优化。
1 表分区的原理
表分区的基本原理,是将存在于数据库中的达标的数据分割开来,形成被称为分区的若干较小的子集,类型有很多,如NTFS、FAT32等,这些子集如果从逻辑关系分析,依然属于一张表。对于程序人员而言,表分区高度透明,因此在进行程序开发设计的过程中,并不需要考虑表分区的物理存储问题。结合SQL Server 数据库进行分析,表分区表现为垂直分区和水平分区两种不同形式,前者指將表分成行数相同,列数较少的表,后者则是将表分为列数相同,行数较少的表。……
