I just recently added a new feature to my CI powered site. Ever since, the site runs so slow. And unfortunately, the new feature was a pretty drastic change so I can’t just roll back to a previous version of the site (without losing a lot of data). Not only is the site slow, but a lot of my users are seeing this error:
Fatal error: Call to a member function num_rows() on a non-object in /home/ptentry/public_html/application/libraries/Sessions.php on line 46
The site is heavily database driven and my best guess is that it is causing stress on my server. I have a dedicated server running cPanel. I’m at the point now where I’d pay for someone to get things running right.
I guess my question is what could have caused this to happen?
All the new feature did was basically change my DB structure, and make it so the data uploaded from a CSV is compared to data I already have in my database. If the data is found, nothing happens. If the data is not found, it inserts into a database. And some new routes were added.
Would DB cache help? Is active record slowing things down? Any input would be appreciated.