A few days ago, I have uploaded my program to production, after ran for two days, my database got 20.000 rows stored data. I thought “This is just 20K data, how about 1 million data, RIP my program haha”. So I decided to make index for my table, the primary purpose is to provide an ordered representation of the indexed data through a logical ordering which is independent of the physical ordering.
This is my query for create index.
Note that operations like UPDATE or INSERT become slower because they are actually two writing operations in the filesystem (one for the table data and one for the index data).