Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7750639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:20:34+00:00 2026-06-01T11:20:34+00:00

I need a very fast SQLite database acces. Setting parameters this way: PRAGMA synchronize

  • 0

I need a very fast SQLite database acces. Setting parameters this way:

PRAGMA synchronize = OFF
PRAGMA jorunal_mode = MEMORY

makes the speed to be enough for my project.
These settings makes SQLite to leave synchronization with database file in the hands of operating system.
But there are a few cases, some certain inserts, after which I must be sure that the data was written to the disk.

Is there any way I can force SQLite to write all data (waiting in memory journal) to disk?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T11:20:36+00:00Added an answer on June 1, 2026 at 11:20 am

    I would suggest you use the recently implemented WAL journal_mode. This way, you can leave synchronous to normal and have all your writes written to disk as you go:

    Write transactions are very fast since they only involve writing the
    content once (versus twice for rollback-journal transactions) and
    because the writes are all sequential. Further, syncing the content to
    the disk is not required, as long as the application is willing to
    sacrifice durability following a power loss or hard reboot. (Writers
    sync the WAL on every transaction commit if PRAGMA synchronous is set
    to FULL but omit this sync if PRAGMA synchronous is set to NORMAL.)

    The above is taken from:

    http://www.sqlite.org/wal.html

    If that is not enough, you can still then invoke PRAGMA database.wal_checkpoint; when you want to be certain that your writes are not only written to disk, but also “integrated” to your DB. Check the following for more information:

    http://www.sqlite.org/pragma.html#pragma_wal_checkpoint

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to insert many sql rows into oracle database very fast. IndexData is
I need a very fast way of displaying a data buffer to screen. I
I need a very fast way to determine if an array consits only of
I need a very accurate way to time parts of my program. I could
I need a very fast method to detect if an image is empty. Im
I need to have very fast access to a big Map - several millions
I need to know how stackoverflow's questiones appear on google search result very fast
I need a very, very fast one-to-one algorithm. The algorithm doesn't need to be
I need a system that writes sequentially, very fast to a synchronized persistent queue
I need very fast conversion from byte array to string. Byte array is Unicode

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.