I am installing a database class in my php application, and I plan to use either PDO or MySQLi I was constantly thinking about the connection, but I am thinking that this is the best idea. I saw, unlike PDO, MySQLi will automatically Resets the connection status with. However, it indicates that the I currently have two questions: Is Constant Connection a Good Idea? Yes, in general save for cheap shared hosts where you should not use it. And if so, with PDO or MySQLi? If you want to change user - Mashakili is the only option. If not - it is irrelevant. Is mysqli_change_user () function so expensive that it eliminates the functionality of continuous connection usage? My general knowledge is telling me that it is not. If this is the case, do you appropriately write the appropriate code, is it a bad idea to disable it? , I would not have bothered at all. There is a problem with performance issues, some of them are real, but some are imaginary, have not gone out of nowhere. It's a strange thing - these latter developers have a huge impact, it always thinks of me, how much time and effort are being made to solve any problem, which is ever seen or measured on living application Has not gone. I suggest that your current application profile (if any) and I have 100: 1 condition that you will find many places in your code which have a 1000 times stronger impact on performance compared to this hypothetical expenditure. . So, I'll keep it. mysqli_change_user () .
mysqli_change_user () function is expensive and can degrade performance, but you can also disable it.
No comments:
Post a Comment