I have multiple pages and every page needs to access to the database. I also had a mysql library with give me an object to connect and run query. Now, at the begin of every page, I used to create a new mysql db object and connect it to the database (with user/pass in config.php), then run whatever query later. But I believe this is slow and thinking about making that database object into session variable so I don't have to create a new one on every page. Now, is it possible? If so, will it improve a lot more? I'm talking about the performance including speed and memory usage.