From 0e33a00dde64a03e7cf26ee9d5b46ea2900ee6d3 Mon Sep 17 00:00:00 2001 From: The Cashew Trader <81344401+thecashewtrader@users.noreply.github.com> Date: Tue, 11 Oct 2022 18:44:07 +0530 Subject: [PATCH] Remove unnecessary `AUTOINCREMENT` from example Firstly, thanks for the great project. According to (the sqlite documentation)[https://www.sqlite.org/autoinc.html], the `AUTOINCREMENT` keyword shouldn't be used in normal cases: > The AUTOINCREMENT keyword imposes extra CPU, memory, disk space, and disk I/O overhead and should be avoided if not strictly needed. *It is usually not needed*. > On an INSERT, if the ROWID or INTEGER PRIMARY KEY column is not explicitly given a value, then it will be filled automatically with an unused integer, usually one more than the largest ROWID currently in use. *This is true regardless of whether or not the AUTOINCREMENT keyword is used*. --- docs/tutorials/getting-started-sqlite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/getting-started-sqlite.md b/docs/tutorials/getting-started-sqlite.md index bebd860b4d..76c2dfc97e 100644 --- a/docs/tutorials/getting-started-sqlite.md +++ b/docs/tutorials/getting-started-sqlite.md @@ -32,7 +32,7 @@ create a file named `schema.sql` with the following contents: ```sql CREATE TABLE authors ( - id INTEGER PRIMARY KEY AUTOINCREMENT, + id INTEGER PRIMARY KEY, name text NOT NULL, bio text );