Fastest is not always the best for your application.
Generally, when it comes to data recovery, it is recommended to use the database.
In a database you can select the record you want to read, since a file is more difficult.
Of course, this all depends on the use case. I would not use, for example, the database to save webservice connection data from my system. I could do this in a config file simply.
As said in a comment, you have to balance to see which of the two meets the most need.
Worrying too much about performance can sometimes be more detrimental than beneficial. I fully agree with the "doctrine of balance" in this case.
Now, I do not say that we should totally ignore it (the performance). If you are going to use a database, you should do the right procedures so that it does not become a burden on the system (I am talking about poorly constructed queries, lack of indexes).
In the end, I do not think it is convenient to make comparisons between the two modes, since each depends on how and in what you will apply. If it does not become the same discussion of POO vs. procedural programming .