Database Partitioning Options DATABASE SHARDING

w主写从读、集群节点间时时内存复制、单表横切纵切、分析报表系统通过服务器联表

http://www.agildata.com/database-sharding/

Database Partitioning Options

It has long been known that database partitioning is the answer to improving the performance and scalability of relational databases. Many techniques have been evolved, including:

  • Master/Slave: This is the simplest option used by many organizations, with a single Master server for all write (Create Update or Delete, or CRUD) operations, and one or many additional Slave servers that provide read-only operations. The Master uses standard, near-real-time database replication to each of the Slave servers. The Master/Slave model can speed overall performance to a point, allowing read-intensive processing to be offloaded to the Slave servers, but there are several limitations with this approach:

    • The single Master server for writes is a clear limit to scalability, and can quickly create a bottleneck.
    • The Master/Slave replication mechanism is “near-real-time,” meaning that the Slave servers are not guaranteed to have a current picture of the data that is in the Master. While this is fine for some applications, if your applications require an up-to-date view, this approach is unacceptable.
    • Many organizations use the Master/Slave approach for high-availability as well, but it suffers from this same limitation given that the Slave servers are not necessarily current with the Master. If a catastrophic failure of the Master server occurs, any transactions that are pending for replication will be lost, a situation that is highly unacceptable for most business transaction applications.
  • Cluster Computing: Cluster computing utilizes many servers operating in a group, with shared messaging between the nodes of the cluster. Most often this scenario relies on a centralized shared disk facility, typically a Storage Area Network (SAN). Each node in the cluster runs a single instance of the database server, operating in various modes:
    • For high-availability, many nodes in the cluster can be used for reads, but only one for write (CRUD) operations. This can make reads faster, but write transactions do not see any benefit. If a failure of one node occurs, then another node in the cluster takes over, again continuing to operating against the shared disk facility. This approach has limited scalability due to the single bottleneck for CRUD operations. Even the reads will ultimately hit a performance limit as the centralized shared disk facility can only spread the load so much before diminishing returns are experienced. The read limitations are particularly evident when an application requires complex joins or contains non-optimized SQL statements.
    • More advanced clustering techniques rely on real-time memory replication between nodes, keeping the memory image of nodes in the cluster up to date via a real-time messaging system. This allows each node to operate in both read or write mode, but is ultimately limited by the amount of traffic that can be transmitted between nodes (using a typical network or other high-speed communication mechanism). Therefore, as nodes are added, the communication and memory replication overhead increases geometrically, thus hitting severe scalability limits, often with a relatively small number of nodes. This solution also suffers from the same shared disk limitations of a traditional cluster, given that a growing, single large database has increasingly intensive disk I/O.
  • Table Partitioning: Many database management systems support table partitioning, where data in a single large table can be split across multiple disks for improved disk I/O utilization. The partitioning is typically done horizontally (separating rows by range across disk partitions), but can be vertical in some systems as well (placing different columns on separate partitions). This approach can help reduce the disk I/O bottleneck for a given table, but can often make joins and other operations slower. Further, since the approach relies on a single server instance of the database management system, all other CPU and memory contention limitations apply, further limiting scalability.
  • Federated Tables: An offshoot of Table Partitioning is the Federated Table approach, where tables can be accessed across multiple servers. This approach is necessarily highly complex to administer, and lacks efficiency as the federated tables must be accessed over the network. This approach may work for some reporting or analytical tasks, but for general read/write transactions it is not a very likely choice.

The common drawback with each of these approaches is the reliance on shared facilities and resources. Whether relying on shared memory, centralized disk, or processor capacity they each suffer with scalability limitations, not to mention many other drawbacks, including complex administration, lack of support for critical business requirements, and high availability limitations.

时间: 2024-11-10 08:14:59

Database Partitioning Options DATABASE SHARDING的相关文章

Oracle? Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct2014) - 傲游云浏览

Skip Headers Oracle? Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct2014) ? Released: October 14, 2014 This document is accurate at the time of release. For any changes and additional information regarding PSU 11.2.0.4

RMAN Duplicate database from Active database with ASM

一.  环境 主库:安装grid软件及创建磁盘组:安装数据库软件并创建数据库, 备库:仅安装grid软件并创建asm磁盘组,同时安装数据库软件即可. 主机名 数据库版本 dbname ORACLE_SID ip地址 系统版本 server1(主) oracle11204 Jason jason 192.168.1.250 rhel6.6_x86_64 server2(备) jason 192.168.1.252 二.  主库配置 1.  开启归档 SQL> archive log list; D

使用duplicate target database ... from active database复制数据库

source db:ora11auxiliary db:dupdb 1.修改监听文件,静态注册监听 SID_LIST_ORA11 = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = ora11) (ORACLE_HOME = /u11/app/oracle/product/11.2.0/dbhome_1) (SID_NAME =ora11) ) (SID_DESC = (GLOBAL_DBNAME = dupdb) (ORACLE_HOME = /u11/app

Oracle 11g Data Guard 使用duplicate from active database 创建 standby database

用这种方式来搭建DG ,主库的停机时间很少,只需要重启一下,使参数生效.也可以用这种方法进行DB迁移.DG搭建好,然后把备库激活就可以了. 这样整个迁移中宕机时间也比较短. Oracle 11g的pyhsical standby 支持open read only 下的apply和Real-time query. 因此就有了physical standby 稳定和logical standby 的报表查询功能. Oracle: 11.2.0.1 OS: redhat 5.5 Primary IP:

msf 启动报[-] * WARNING: No database support: No database YAML file解决方法

在启动msf是遇到以下问题! [-] * WARNING: No database support: No database YAML file 这是由于postgresql 未进行postgresql 的初始化配置,所以报错没有这个数据库. 解决问题 启动 msf ,初始化数据库配置信息. 利用命令 msfdb init 进行数据初始化配置 [*]也许你会遇到以下错误 如果你是一root运行的msf ,就不会出现这种问题 当你输入msfdb init 不出意外就会出现下图.那么证明你已经成功解

Azure SQL Database (18) Stretch Database 概览

<Windows Azure Platform 系列文章目录> Stretch Databse使用场景: 笔者有一个快消品用户,每天产生几百万笔订单数据.这些订单数据保存在一个运算能力非常强大的数据中心物理机里. 对于这些订单数据来说,分为两类: 1.热数据:最近1个月产生的订单数据. 对于热数据来说,企业需要对这些数据进行统计分析,方便进行查询. 2.冷数据:过去1-3年产生的订单数据. 在传统IDC运维中,经常会对冷数据进行备份归档,比如采用磁带库等. 但是归档的数据其实是离线状态的,也就

create database ,drop database ,show Databases,use 数据库 ,怎么使用?

1)库本身的基本操作:(视频下载) (全部书籍) 1)创建数据库:create database 数据库名字;2)删除数据库:drop database 数据库名字;3)查看数据库:show Databases; 显示由Server管理的数据库4)使用数据库,之后的操作就针对此数据库了:use 数据库名字 详情请见:http://www.mark-to-win.com/index.html?content=Mydb/DBUrl.html&chapter=Mydb/DBIntroduction_w

oracle 11g Active database duplicate

测试使用 Active database duplicate在不同机器不同数据库实例复制数据库 环境: Target DB: IP:10.131.119.118 HOSTNAME:CS-SI-DG01 ORACLE_SID:orcl Auxiliary DB: IP:10.131.119.119 HOSTNAME:CS-SI-DG02 ORACLE_SID:orclaux 1.将Target DB库的参数文件和密码文件scp到Auxiliary DB库 [[email protected] db

【翻译自mos文章】当控制文件的备份丢失是,怎么restore database

当控制文件的备份丢失是,怎么restore database? 来源于: How to restore database when controlfile backup missing (文档 ID 1438776.1) 适用于: Oracle Database - Enterprise Edition - Version 9.2.0.1 to 11.2.0.3 [Release 9.2 to 11.2] Information in this document applies to any p