Every user on my site has a settings file hosted on the server. The user can add and delete “items”, for which a reference of them is added to the settings list; therefore, it can become quite big if the user has many “items”. The specific question is: is it more efficient to store a file in a PHP Session or just access it for every page request.
I thought about using a database instead of a settings file; however, I thought it would be extremely inefficient since there would be one entry per item each user adds. But, would it still be more efficient to use SQL?
P.S: “items” are actually applications, but for the sake of not confusing, it was changed.
If you believe this question is confusing or requires further explanation, please comment!
SQL by itself is not very efficient, but the storage engine for sorting / filtering / presenting is. On the other hand the session is just a plain file in some kind of storage, meaning: