I'm working on a site and need to keep a few variables in memory The problem is that the variables will be changing often, so often that I will have to check them every time the page loads. I guess I would have keep those variables in a table so the table gets updated when they change and everybody can get the new variables a soon as they change. I'm not sure if there's a way to update php sessions when the variable has changed? I don't think something like that exists... so I'm going to use a mysql table to store them but I was thinking perhaps I can store them on an XML file and open up the XML file every time the page loads instead of adding an extra mysql query to every page load? The site gets million of page views every month so an extra query means millions of new queries for the server to handle Which one would be faster or more efficient?