Skip to content

Conversation

@thecashewtrader
Copy link
Contributor

Firstly, thanks for the great project.

According to the sqlite documentation, 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.

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*.
@kyleconroy kyleconroy merged commit a5d4ed9 into sqlc-dev:main Oct 11, 2022
akutschera pushed a commit to akutschera/sqlc that referenced this pull request Nov 10, 2022
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*.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants