From 0a4fea0a9ac8c6bdc5cd8e60a9bfbc192081f22c Mon Sep 17 00:00:00 2001 From: Sean Wei Date: Mon, 25 Apr 2022 16:29:19 +0800 Subject: [PATCH] Remove redundant space in `code ` block --- solutions/system_design/mint/README.md | 6 +++--- solutions/system_design/sales_rank/README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/solutions/system_design/mint/README.md b/solutions/system_design/mint/README.md index 1ec31674..79080d46 100644 --- a/solutions/system_design/mint/README.md +++ b/solutions/system_design/mint/README.md @@ -110,7 +110,7 @@ PRIMARY KEY(id) FOREIGN KEY(user_id) REFERENCES users(id) ``` -We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id`, `user_id `, and `created_at` to speed up lookups (log-time instead of scanning the entire table) and to keep the data in memory. Reading 1 MB sequentially from memory takes about 250 microseconds, while reading from SSD takes 4x and from disk takes 80x longer.1 +We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id`, `user_id`, and `created_at` to speed up lookups (log-time instead of scanning the entire table) and to keep the data in memory. Reading 1 MB sequentially from memory takes about 250 microseconds, while reading from SSD takes 4x and from disk takes 80x longer.1 We'll use a public [**REST API**](https://github.com/donnemartin/system-design-primer#representational-state-transfer-rest): @@ -160,7 +160,7 @@ PRIMARY KEY(id) FOREIGN KEY(user_id) REFERENCES users(id) ``` -We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id`, `user_id `, and `created_at`. +We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id`, `user_id`, and `created_at`. The `monthly_spending` table could have the following structure: @@ -174,7 +174,7 @@ PRIMARY KEY(id) FOREIGN KEY(user_id) REFERENCES users(id) ``` -We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id` and `user_id `. +We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id` and `user_id`. #### Category service diff --git a/solutions/system_design/sales_rank/README.md b/solutions/system_design/sales_rank/README.md index 71ad1c7d..a6c340ad 100644 --- a/solutions/system_design/sales_rank/README.md +++ b/solutions/system_design/sales_rank/README.md @@ -196,7 +196,7 @@ FOREIGN KEY(category_id) REFERENCES Categories(id) FOREIGN KEY(product_id) REFERENCES Products(id) ``` -We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id `, `category_id`, and `product_id` to speed up lookups (log-time instead of scanning the entire table) and to keep the data in memory. Reading 1 MB sequentially from memory takes about 250 microseconds, while reading from SSD takes 4x and from disk takes 80x longer.1 +We'll create an [index](https://github.com/donnemartin/system-design-primer#use-good-indices) on `id`, `category_id`, and `product_id` to speed up lookups (log-time instead of scanning the entire table) and to keep the data in memory. Reading 1 MB sequentially from memory takes about 250 microseconds, while reading from SSD takes 4x and from disk takes 80x longer.1 ### Use case: User views the past week's most popular products by category