×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    2

    SQLite transaction and commit on drive other than c:

    Hello everyone.

    My tests have shown that if i have a database placed on the c: drive transactions in sqlite work ok. Insert time for my specific set of queries varies between 1-2 seconds. Now if i move the file to memory card which is the e: drive on my e7 transactions stop working. The same queries take 50-55 seconds. It's not just a matter of the memory card having slower writes. I checked, confirmed and i am sure that when c: is used to store the database transaction starts, queries get put into the queue and commit happens writing all the data at once. When i use the e: drive the transaction never starts (altrough transaction() returns true) and the queries get executed one-by-one.

    Is this a known bug? Can this be a problem with file locking perhaps. For example the database driver has to lock the file for the duration of the transaction but can't on the e: drive?

    Please help

  2. #2
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: SQLite transaction and commit on drive other than c:

    try to play with SQLite pragmas:
    PRAGMA page_size = 4096
    PRAGMA cache_size = 16384
    PRAGMA temp_store = MEMORY
    PRAGMA journal_mode = OFF
    PRAGMA locking_mode = EXCLUSIVE

  3. #3
    Registered User
    Join Date
    Sep 2012
    Posts
    2

    Re: SQLite transaction and commit on drive other than c:

    WOW. It works. Just like that. Nokia Developer Champion is right

  4. #4
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: SQLite transaction and commit on drive other than c:

    Quote Originally Posted by leszczmydlo View Post
    WOW. It works. Just like that. Nokia Developer Champion is right
    great to know it helps, but...I strongly suggest to read SQLite docs regarding the pragmas. very oftef when you achieve speedup, you loose in safety

Similar Threads

  1. Fast DB Transaction in SQLite in Qt for Symbian/Maemo.
    By narendar_discover in forum [Archived] Beginning Qt
    Replies: 1
    Last Post: 2011-02-17, 12:58
  2. Remote Drive -Drive Number
    By indeewari in forum Symbian
    Replies: 0
    Last Post: 2010-08-09, 11:03
  3. J2ME jsr-75 commit issues
    By markusSV in forum Mobile Java General
    Replies: 12
    Last Post: 2010-08-02, 11:15
  4. Sqlite Commit problem
    By athir.gillani in forum Symbian
    Replies: 3
    Last Post: 2009-07-09, 15:27
  5. store->Commit vs stream->Commit
    By alexhello123 in forum Symbian
    Replies: 0
    Last Post: 2006-02-21, 06:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •