Skip to content

Commit

Permalink
add a diagram to show the usage scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperphoton committed Jan 17, 2022
1 parent 08623f8 commit a35d9ef
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

English | [简体中文](./README.zh-CN.md)

Gorm Plugin for sharding table.
Gorm Sharding splits large tables into smaller ones to speed up access.

This plugin base on SQL Parser, catch raw SQL before execute db, and then replace table name by sharding rules.
Assume we have an order table with 100 million rows, we can divide it into 1000 smaller ones, so the read and write operation will faster than operate the original table.

![Example Scenario](./images/example-scenario.svg)

## Features

Expand Down
8 changes: 6 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Gorm Sharding

Gorm 分表插件。
[English](./README.md) | 简体中文

基于 SQL 解析器,执行前捕获原始 SQL,根据分表规则替换表名。
Gorm Sharding 将大表拆分成多个小表来加速访问。

假设有一个一亿行的订单表,我们可以将它拆分成一千个小表,这样读写操作就会比操作原始表快很多。

![场景示例](./images/example-scenario.svg)

## 特色

Expand Down
1 change: 1 addition & 0 deletions images/example-scenario.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-01-17T08:23:48.353Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" etag="v5KhPhKG7QMKiUGquWLM" version="16.2.7" type="device"><diagram id="prtHgNgQTEPvFCAcTncT" name="Page-1">7Vpdb5swFP01eZnUyAYCyWOXdp32IbXLw7qnyg0OsBlMjfO1Xz8b7AAhiUgbIGpGpBJfXxvjc869dtyeOQ5XdwzF/nfqYtIzgLvqmTc9w4CWYYubtKwziwOVwWOBq5xywyT4i5URKOs8cHFScuSUEh7EZeOURhGe8pINMUaXZbcZJeWnxsjDFcNkikjV+jNw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file>
3 changes: 3 additions & 0 deletions images/example-scenario.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions keygen/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# keygen

English | [简体中文](./README.zh-CN.md)

Distributed Primary Key generator.
5 changes: 5 additions & 0 deletions keygen/README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# keygen

[English](./README.md) | 简体中文

分布式主键生成器。
3 changes: 0 additions & 3 deletions keygen/README_zh.md

This file was deleted.

0 comments on commit a35d9ef

Please sign in to comment.