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

  • Home
  • SEARCH
  • 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 7728987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:51:19+00:00 2026-06-01T05:51:19+00:00

I need to store simultaneous readings from 10 sensors into a SQLite database at

  • 0

I need to store simultaneous readings from 10 sensors into a SQLite database at about 100Hz. Which means I need to store about 1000 readings a second into the database.

I’ve tried putting the database insert method in a Service running in its own process but I can only collect about 3.5 seconds worth of data. I think the Service is being killed at that point.

I am not using database transactions to insert the data. Just individual calls of INSERT INTO… Is it crucial to use transactions?

Is it necessary to run the database inserts in a separate process? Can I just run them in a new thread off the main process?

I can provide code if needed.

  • 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-01T05:51:21+00:00Added an answer on June 1, 2026 at 5:51 am

    You need to use transactions, and “chunk” your requests by performing multiple inserts in the same transaction. You’ll have to play with the number of inserts, but I would start at 1000 inserts per transaction, and tweak it from there.

    Transactions are extremely slow, if you want to insert one record at a time. The reason for this is that SQLite waits for the data to be written to disk before completing the transaction, and so has to wait for the disk platters to spin completely around, during which time the disk is essentially inactive.

    On a 7200 RPM hard drive, this essentially limits transactions to 60 per second.

    http://www.sqlite.org/faq.html#q19

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

Sidebar

Related Questions

I need to store a lot of data coming in from a server into
Need to store values from foreach loop into an array, need help doing that.
I need to store various info about some movies, books, games, and maybe other
I need to store a series of configuration values in a database. A couple
I need store multiple currencies on my database... Here's the problem: Example Tables: [
I have issue where I need store info about users in DB and authorize
I need to store around 100 millions of records on the database. Around 60-70%
I have id values for products that I need store. Right now they are
I need to store IP address in the most compact way possible, searching is
I need to store up to tens or even hundreds of millions of pieces

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.