SQL Tutorial #6: Indexes and Performance — Making Queries Fast
Your queries work. But they are slow. A simple SELECT takes seconds instead of milliseconds. On a table with millions of rows, it could take minutes. The fix is almost always the same: add an index. In the previous article, you learned about window functions. Now you will learn how to make all your queries run fast. What Is an Index? Think of a book’s index at the back. If you want to find “window functions” in a 500-page book, you have two options: ...