横向扩展 纵向扩展 数据库

Let’s continue the hybrid saga! After two articles talking about the Azure Blob Storage and what we can do using it, it’s time to check an alternative solution, that does the same of what was presented in the last article (a Hybrid Database used as archival solution for who didn’t read). This time we are not using the Azure Blob Storage, but we are still using Azure!

让我们继续混合传奇! 在讨论了有关Azure Blob存储以及我们可以使用它的方法的两篇文章之后,是时候检查另一种解决方案了,该解决方案与上一篇文章中介绍的功能相同(将混合数据库用作没有解决方案的归档解决方案)读)。 这次我们不使用Azure Blob存储,但是我们仍在使用Azure!

The feature is…Stretch Database

功能是… 拉伸数据库

Yes, this is a new feature! So new that is only available in the CTP version of SQL Server 2016. However this is available for download, for free of course, and you can start testing its implementation.

是的,这是一项新功能! 如此新,仅在SQL Server 2016的CTP版本中可用。但是,此内容可免费下载,当然,您可以开始测试其实现。

此功能有什么作用? ( What does this feature do? )

Basically the same as we presented in the other article, but with more advantages and an easy way to implement…

与我们在另一篇文章中介绍的基本相同,但是具有更多的优点和易于实现的方法……

In the previous part of this series, we identified a challenge: keep historical data in the database, transparently to the users and applications, without compromise te performance and increase costs.

在本系列的前一部分中,我们确定了一个挑战 :将历史数据保留在数据库中,对用户和应用程序透明,而又不影响性能和增加成本。

The solution found was:
Implement table partitioning, pointing the partition with the old data to a file in Azure Blob Storage service.

找到的解决方案是:
实现表分区,将带有旧数据的分区指向Azure Blob存储服务中的文件。

Advantages:
Transparent, improves the performance in the access to current data and eliminates the physical disk used to store the old data.

优点:
透明,可提高访问当前数据的性能,并消除用于存储旧数据的物理磁盘。

Well, that solution works, but there are other points make us thing:

好的,该解决方案有效,但还有其他几点使我们变得如此:

    • And we need to maintain this during the database/table lifecycle.而且我们需要在数据库/表生命周期内维护它。
  • By default (there are workarounds), the backup will remain the same, and maybe slower as we are accessing the network to read the historical data now. 默认情况下(有解决方法),备份将保持不变,并且由于我们现在访问网络以读取历史数据而可能会变慢。

Those problems are solved if you start using the Stretch Database! Why? I will explain…

如果您开始使用Stretch Database,这些问题将得到解决! 为什么? 我会解释…

The “Stretch Database” is a feature/service based on “Azure SQL Database”, so, no Azure Blob Storage here… When you enable this capability in the database a SQL Database will be created under you Azure subscription.

“ Stretch数据库”是基于“ Azure SQL数据库”的一项功能/服务,因此此处没有Azure Blob存储…在数据库中启用此功能后,将在Azure订阅下创建一个SQL数据库。

The first step to start using this, in fact, is enable the feature (of course!), as shown in the next image, right-click in the database, select “Tasks” and “Enable Database for Stretch”:

实际上,开始使用此功能的第一步是启用该功能(当然!),如下图所示,右键单击数据库,选择“任务”,然后选择“启用数据库进行拉伸”:

A Wizard will be opened, where you will need to authenticate to you Azure subscription and define the settings of this feature.

将打开一个向导,您需要在其中向Azure订阅进行身份验证并定义此功能的设置。

There are two possible models:

有两种可能的模型:

  • Archive Table: Where the entire table will be moved to the cloud.存档表:将整个表移到云中的位置。
  • Archive Rows: Where only the selected rows will be moved.存档行:仅将选定的行移动到的位置。

The second option, is closer of what we talked in the previous article, anyway, you can do the same of “Archive Table” option using Azure Blob Storage… And it is easier than implement the table partitioning.

第二个选项与我们在上一篇文章中讨论的内容更加接近,无论如何,您可以使用Azure Blob存储执行“存档表”选项的操作……而且比实现表分区更容易。

Still talking about the “Archive Rows” option, this is still not available in the current CTP, as it is still under development, but the main idea is select the eligible rows to be moved to Azure, based in some define conditions (like a where clause).

仍在谈论“存档行”选项,该选项在当前CTP中仍不可用,因为它仍在开发中,但是主要思想是根据某些定义条件(例如where子句)。

All the rows will be moved silently using a retry option, to assure that there’s no data loss. This is true for both options… Oh, this feature is also transparent for the applications and users using the database, which is awesome!

所有行将使用重试选项以静默方式移动,以确保不会丢失数据。 这对两个选项都是正确的……哦,对于使用数据库的应用程序和用户来说,此功能也是透明的,太棒了!

By using this, you may have something like the showed in the following image, for the “Archive Rows” mode:

通过使用此选项,对于“存档行”模式,您可能会具有下图所示的内容:

You that read the previous article should be thinking “Ok, but what is the advantage of this feature against the other one?”.

阅读上一篇文章的您应该思考“好吧,但是此功能相对于另一功能有什么优势?”。

We can start from the basic:

我们可以从基本开始:

  • It is easier to implement, and won’t be changing the physical structure of the database (no extra files and filegroups are needed).它更易于实现,并且不会更改数据库的物理结构(不需要额外的文件和文件组)。
  • We won’t need to implement a partitioning logic (no partition scheme, function, etc..).我们不需要实现分区逻辑(无需分区方案,函数等)。
  • There’s a wizard integrated to SQL Server Management Studio that helps us to reach our objective (wizards are always interesting).SQL Server Management Studio中集成了一个向导,可帮助我们实现目标(向导总是很有趣)。
  • And the best! As we are based in a Azure SQL Database, the database size on-premises will be reduced, reducing backups size and time to complete! 最好的! 由于我们基于Azure SQL数据库,因此将减少本地数据库的大小,从而减少备份的大小和完成时间!
  • Because of the same reason, the database maintenance will be improved (comparing time x efficiency).由于相同的原因,数据库维护将得到改善(比较时间x效率)。
  • All those differences in the database maintenance are automatic, we won’t need to change nothing…数据库维护中的所有这些差异都是自动的,我们无需进行任何更改…

要使用“拉伸数据库”功能,我需要具备什么条件? ( What would I need to have in order to use the Stretch Database feature? )

First of all, the very basic: An Azure account, of course

横向扩展 纵向扩展 数据库_扩展数据库–减少扩展的艺术相关推荐

  1. 横向扩展 纵向扩展 数据库_理解数据库扩展模式的指南

    横向扩展 纵向扩展 数据库 There are lot of articles online describing database scalability patterns, but they ar ...

  2. tidb数据库_异构数据库复制到TiDB

    tidb数据库 This article is based on a talk given by Tianshuang Qin at TiDB DevCon 2020. 本文基于Tianshuang ...

  3. 如何避免循环查询数据库_与数据库无关的查询是不可避免的

    如何避免循环查询数据库 As the amount of data managed by an organization grows, the difficulty of managing and q ...

  4. 操作 神通数据库_国产数据库最好的时代

    全文约2580字,阅读约15分钟 近日,墨天轮发布了2020年新一期的国产数据库名单,东方国信完全自主研发的分布式分析型数据库CirroData名列其中. "墨天轮"是国内数据库领 ...

  5. gp数据库创建数据库_创建数据库简介

    gp数据库创建数据库 MySQL是当今最流行的开源数据库之一. 它在商业和开源双重许可模式下可用. MySQL找到了从嵌入式设备到集群企业环境的各种应用程序. POWER5™处理器是IBMPPC®AS ...

  6. mysql时序性数据库_时序数据库入门

    数据库的模型包含关系型.key-value 型.Document 型等很多种,那么为什么新型的时序数据库成为监控数据存储的新宠呢? 下面就会从 为什么需要时序数据库? 时序数据库的数据结构 两个方面来 ...

  7. sql还原数据库备份数据库_有关数据库备份,还原和恢复SQL面试问题–第一部分

    sql还原数据库备份数据库 So far, we've discussed a lot about database backup-and-restore process. The backup da ...

  8. sql还原数据库备份数据库_有关数据库备份,还原和恢复SQL面试问题–第二部分

    sql还原数据库备份数据库 In this article, we'll walk through, some of the refined list of SQL Server backup-and ...

  9. sql还原数据库备份数据库_有关数据库备份,还原和恢复SQL面试问题–第IV部分

    sql还原数据库备份数据库 In this article, we'll see the how the backup-and-restore meta-data tables store the i ...

  10. sql还原数据库备份数据库_有关数据库备份,还原和恢复SQL面试问题–第三部分

    sql还原数据库备份数据库 So far, we've discussed a lot about database backup commands. In this article, we'll d ...

最新文章

  1. encoder-decoder 注意力机制整理名望所
  2. python/Django(增、删、改、查)操作
  3. 进程间通信:消息队列概念及代码
  4. libevent源码分析:eventop
  5. 公积金10万元,为何却不能贷款买房?
  6. mysql中创建表并添加约束_创建表并添加约束
  7. linux定时重启tomcat的脚本,Linux系统中的tomcat定时重启脚本
  8. 八、接口中的默认方法与静态方法
  9. STM32——SDIO进行SD卡读写测试
  10. selenium爬虫模拟登录PayPal
  11. 【转】Oracle知识点汇总
  12. MATLAB及Simulink----基本知识简介
  13. Windows XP中手动安装驱动程序的方法
  14. 火绒卸载之后的残留文件夹问题
  15. 一位北大才子的光棍节情诗
  16. 怎么打开本地计算机策略编辑器,打开本地组策略编辑器; 2.在弹出的本地组策略编辑器窗口...
  17. 【论文写作】有了这些网站,可以解决论文写作中99.9%的问题!
  18. php数独,php数独求解
  19. 7段均衡器最佳参数_汽车音响7段均衡器设置,七段均衡器常用调校图
  20. R数据分析|可视化|dplyr|Kaggle奥运会数据集(一)

热门文章

  1. vs没有添加引用_NBA 季后赛 湖人vs火箭 G2大战谁能防住哈登?
  2. 《中国企业报》:SNS网站稳步发展进军海外
  3. 。。。剑指Offer之——反转链表。。。
  4. 从头认识Spring-3.4 简单的AOP日志实现-扩展添加检查订单功能,以便记录并检測输入的參数...
  5. 关于Cocos2d-x中GameController的定义
  6. CentOS 下 Oracle 10g 安装 + 配置 全过程(图解)
  7. 缺陷管理规范--bug管理流程
  8. μC/OS-II实时性能测试与分析
  9. VUE 生命周期图示
  10. JavaScript数据结构——链表(Linked List)