Hello Simon,

Code looks like this:


     /* move content */
      sqlite3_backup *pBackup;

      pBackup = sqlite3_backup_init(destDBHandle, "main", sourceDBHandle,
"main");

      if(pBackup)
      {
         int sqlErrno;
         if ((sqlErrno = sqlite3_backup_step(pBackup, -1)) != SQLITE_DONE)
         {
            Tr_Err("SwapDB sqlite3_backup_step sqlErrno %d", sqlErrno);

            result = false;
         }
         if ((sqlErrno = sqlite3_backup_finish(pBackup)) != SQLITE_OK)
         {
            Tr_Err("SwapDB sqlite3_backup_finish sqlErrno %d", sqlErrno);

            result = false;
         }
      }
      else
      {
         Tr_Err("SwapDB could not be init");
         result = false;
      }


Br
Vivek


On Wed, Jun 25, 2014 at 10:14 PM, Vivek Ranjan <viveksar...@gmail.com>
wrote:

> Dear All,
>
> I am unsing SQLite on NOR Flash with Sqlite version 3.8.5 with default
> setting i.e. sector and page size. Writing to NOR Flash taken around 10
> seconds ( SQLite file size of 400KB, which is somehow not acceptable). Upon
> inserting additional debug prints, I found that since I use the  following
> API
>
> sqlite3_backup_init()
> <http://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit>
> sqlite3_backup_step()
> <http://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep>
> sqlite3_backup_finish()
> <http://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish>
>
> SQLite writes data in very small chunks i.e. 1, 4, bytes which causes the
> poor performance while writing to Flash
>
> Please suggest if there are some experiences to fine tune the writes to
> NOR Flash.
>
> Kind Regards
> Vivek
>
>


-- 
Vivek(Mobile) :  +49 17655 040018
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to