Welcome Guest, Not a member yet? Register   Sign In
ODBC Connection being extremely slow
#1
Exclamation 

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';
$query_builder TRUE;

$db['default'] = array(
    
'dsn'    => '',
    
'hostname' => 'Driver={SQL Server};Server=MATTHEW;Database=db1;',
    
'username' => 'root',
    
'password' => 'root',
    
'database' => 'db1',
    
'dbdriver' => 'odbc',
    
'dbprefix' => '',
    
'pconnect' => FALSE,
    
'db_debug' => TRUE,
    
'cache_on' => FALSE,
    
'cachedir' => '',
    
'char_set' => 'utf8',
    
'dbcollat' => 'utf8_general_ci',
    
'swap_pre' => '',
    
'encrypt' => FALSE,
    
'compress' => FALSE,
    
'stricton' => FALSE,
    
'failover' => array(),
    
'save_queries' => TRUE
); 

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.
Reply


Messages In This Thread
ODBC Connection being extremely slow - by mdixon18 - 07-08-2015, 06:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB