Hi To All
I am new to the list

In fact i had a logging system (to log errors and messages),
for my application using text file, but its very slow.

I tried SQlite, and its slower than the text file, is it normal??

I do the folowing :


//Creating the db file
    int rc;
    rc = sqlite3_open(sFileName, &m_pSqliteDb);
    if( rc ){
        sqlite3_close(m_pSqliteDb);
        m_pSqliteDb=NULL;
        return;
    }

    rc = sqlite3_exec(m_pSqliteDb,"CREATE TABLE LOGS(L_ID INTEGER PRIMARY
KEY,L_PROCESS INTEGER, L_THREAD INTEGER,L_MESSAGE TEXT,L_DATE TIMESTAMP)",
0, 0, 0);

adding a log:

        rc = sqlite3_exec(m_pSqliteDb,"INSERT INTO
LOGS(L_PROCESS,L_THREAD,L_MESSAGE,L_DATE)
VALUES(nProc,nThread,'sMessage',date('now'))", 0, 0, 0);

it works, but its very slow?
is this normal

Thank you

Kh.K

Reply via email to