In the previous segment, you learnt about some of the important best practices that you should follow while writing queries and understood the uses of the SQL Formatter. Now, one of the ways in which you can greatly reduce the runtime of your queries is by using indexing. Indexing is the process of referring to only the required value(s) directly, instead of going through the entire table. This prevents the query engine from looking up values one by one; instead, it returns the exact value that you want right away.
As explained in this video, indexing is necessary for querying extremely large data sets. A primary key is an index because it helps in identifying each record in a table uniquely. Note that you cannot actually see an index, as it is an internal construct used in database engines to speed up queries.
In the next segment, you will learn the syntax for creating, adding and dropping an index in your query. You can learn more about indexing and any other concept(s) by referring to the MySQL documentation. Refer to the link below to understand what the documentation says about indexing.