Created
August 9, 2018 10:12
-
-
Save reinislejnieks/c446eecd1128fcb927bf6ffb2954c362 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Indexes are best used on columns that are frequently used in where clauses, and in any kind of sorting, such as "order by". | |
If we assign ID as a primary key, we don't need one there. | |
*/ | |
CREATE INDEX tablename_columnname_idx | |
ON tablename (columnname) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment