ODBC Connection being extremely slow - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: ODBC Connection being extremely slow (/showthread.php?tid=62384) |
ODBC Connection being extremely slow - mdixon18 - 07-08-2015 Hi, I'm looking to use ODBC in order to connect to an MSSQL database, however, just including the 'database' library in the autoload.php file is causing issues. Pages are therefore taking ages to load which is a serious problem, i'm having to wait 10-20 seconds. Now, I am not running any queries at this time, it's clearly just the connection. Therefore I was wandering if their was a problem with my database connection settings. Let me show you them: PHP Code: $active_group = 'default'; Is there a problem with what I'm doing? Is ODBC just slow with Codeigniter? I've tried the same connection settings outside of Codeigniter and it runs smoothly but I would like my project to use Codeigniter so any help would be appreciated. RE: ODBC Connection being extremely slow - mwhitney - 07-08-2015 If possible, you may want to use the SQLSRV driver instead. http://php.net/manual/en/intro.sqlsrv.php However, when you say you used the same connection settings outside of CodeIgniter, does that mean you've setup a simple PHP script to run Code: $connection = odbc_connect('Driver={SQL Server};Server=MATTHEW;Database=db1;', 'root', 'root'); |