Two.
I'm serious. If now there are two lines, and there will always be two lines, the cost of indexing is almost zero. This is indexed faster than thinking about whether you need to. The optimizer will not take very long to understand that scanning a table is faster than using an index.
If there are two lines now, but in the near future there will be 200,000, the cost of indexing can become prohibitive. The right time to consider indexing is now.
Having said that, remember that you automatically get the index when declaring the primary key. Creating a table without a primary key requires most problems. Thus, the only time you really need to consider indexing is to specify an index that is different from the index of the primary key. You must know the traffic and expected volume for this call. If you make a mistake, you will find out, and you can cancel the decision.
I once saw a referenced table that was created without an index when it contained 20 rows. Due to a business change, this table grew to 900 rows, but the person who was supposed to notice the lack of an index did not. The insertion time of a new order increased from approximately 10 seconds to 15 minutes.
Walter mitty
source share