3
Well I have a question and I wanted the opinion of more experienced people.
I have a PHP system that uses Mysql. I have a table called 'access' where I save the options that the user has to access the system. The problem is that every time I load the page I have to select in the BD.
I want to improve the performance of the system, and I have taken several steps towards it. And one of them is to try to decrease the 'select''.
Well let’s have a doubt, what I want to know is: 1- Is that the best way to do it? 2- Would it be easier to save user permissions in the session to avoid select? 3- Session reading and faster than select in BD?
Well, I’m waiting for help with a good solution.
What information do you search for in the selection? And how often they are changed?
– Allan Andrade
Well they are rarely changed, as they are saved when the user is registered. Well it is a table that is called 'access', and counts about 40 fields. Example: the fields 'edit product' in it I saved’s' or 'n'. With this I know if the user can edit the products.
– Hugo Borges
Sorry for the delay, but I’ve seen that @Italorodrigo has given a good answer! + 1 for you and the answer.
– Allan Andrade