hi,
if I create a QSqlDatabase, the .open() method call is extremly slow.
Does anyone know whats wrong?
best
ps.: I'm connecting on a local database
Printable View
hi,
if I create a QSqlDatabase, the .open() method call is extremly slow.
Does anyone know whats wrong?
best
ps.: I'm connecting on a local database
Please provide more details.
I'm adding a database using the driver QPSQL7 :
Code:
... m_db.setHostName(strHostName.c_str()); m_db.setDatabaseName(strDatabaseName.c_str()); m_db.setUserName(strUserName.c_str()); m_db.setPassword(strPassword.c_str()); m_db.setPort(iPort); ...
while calling:
my app blocks for about two secondsCode:
m_db.open();
Does it also block for two seconds if you use psql console? Maybe your database is clogged and needs some vacuuming? How did you calculate those two seconds, by the way? Like that?
Yes I did that...
I tried to vacuum the database (VACUUM tablename; ) before calling
Code:
m_db.open()
But that caused a timedelay of 2,2 seconds... I have no clue whats wrong...
best,
Hoshy
Again, how do you calculate the delay?