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 6209785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:02:51+00:00 2026-05-24T06:02:51+00:00

Okay, so I’m observing some behavior that I would certainly call ‘unexpected’ and I’m

  • 0

Okay, so I’m observing some behavior that I would certainly call ‘unexpected’ and I’m curious if anyone can offer and insight as to what on earth is going on. I’ll try to keep it concise…

I have a sqlite database that I’m accessing with Python (150k rows, 11 tables) for the purposes of neural network training. The ends are inconsequential, but it means that my data points are stored in one table as rather large blobs and the DB is about 5GB. Because I’m only pulling certain rows (due to cross validation or other kinds of filtering), I’ve found indexing on certain meaningful columns to result in significant increases in speed. When the sun is shining, I can select, fetch and format about 500 datapoints in around 2 seconds. This is great.

However, as anyone familiar with neural nets / backprop / SGD can attest, this process can – depending on the data and architecture – take forever. To optimally parallelize things, I’ve requisitioned multiple machines (Mac Pro, 8GB RAM, 16 cores at who knows what speed) to launch training scenarios under different conditions in different threads. Due to memory limitions, the ceiling is around 6 or 7 separate threads each accessing the same database file. Now, to the best of my knowledge, these machines are identical.

Here’s where it gets bizarre. At first, performance was stellar on my baseline machine, and the parallel thread count never slowed things down (one thread versus seven was basically equal). When I first copied this database file to other machines (and recreated my indexes), one was equally as fast as my baseline, but another was about twice as slow. I figured (at the time) it was a hardware discrepancy and moved on with my life. Then, having modified the sqlite database and recopying to all the machines, it is now fast on the machine it was previously slow on, while all other machines are showing slower performance – including the baseline.

I don’t get it. I’ve done the same things to all instances. The database files are identical on copy, and then I drop / create the same indexes, as I’m pretty sure sqlite indexes refer to absolute locations on disk. I’m in a unix environment so file fragmentation shouldn’t be the culprit (right?). Concurrency doesn’t seem to be an issue in some configurations, while others result in a bottleneck. I’ve since checked and the machines are actually identical on paper. And the most confusing part for me is that performance is differing within the configuration of a single machine.

I’m really at a loss. Any kind of direction would be greatly appreciated. I’m by no means well-versed in relational database programming, but I’m out of ideas at this point.

UPDATE: I might have ‘resolved’ my issue, but in no way is this question answered. I’ve found that if I basically power-cycle the database file on each system, I eventually get the performance to be equal across machines. The process is something like…

    while unhappy:
 1. Drop all indexes
 2. Create new indexes
 3. Make a handful of select/fetch calls
 4. Commit / quit / restart

After a while, it seems to settle out to something satisfactory. No idea why though.

  • 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-05-24T06:02:52+00:00Added an answer on May 24, 2026 at 6:02 am

    If you aren’t running the databases with auto_vacuum=FULL, it could be that you have some fragmentation of the data structure in the database file. Have you tried to run VACUUM on your databases?

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

Sidebar

Related Questions

Okay so im working on this php image upload system but for some reason
Okay, here's the scenario. I have a utility that processes tons of records, and
Okay, I've seen but haven't programmed in C# before. You can assume I'm competent
Okay, we know that the following two lines are equivalent - (0 == i)
Okay, I might confuse some people who might be able to answer this question,
Okay, in python one can do this: def foo(monkeys): def bar(monkey): #process and return
Okay, so I've got some C code to perform a mathematical operation which could,
Okay, I'm having some serious issues here. I'm new to this site, and new
Okay, I'm creating a program from a single class, let's call it John class.
Okay, I've looked all over the internet for a good solution to get PHP

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.