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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:23:04+00:00 2026-06-01T20:23:04+00:00

I want to read all rows in a table using system.data.sqlite. As I have

  • 0

I want to read all rows in a table using system.data.sqlite. As I have a very big Table (>450GB, with > 6 billion rows) I want to be sure that sqlite will use consequtive disk access. As you may know a random access to hard disk is slow. Due to memory restictions I can not load all the data at once. So the optimal way would be if sqlite reads some hundred MB (consecutive), then I work with this data and sqlite reads the next.

How can I be sure that sqlite will do disk access this way and not jumping from one position on hard disk to another?

Things I know (I think these suggestions will show up):

  • It could be better to use an other DBMS. But I want/need to solve it wiht this one.
  • I know that the disk head will be positioned by the OS on other data while I am workign with thhe data. This doesn’t matter. It is just that some hundret MB will be read consecutively.
  • I don’t want to / can split the database file up into smaller pieces

I found this post, but it is not addressing my problem correctly:
Which is the fastest way to retrieve all items in SQLite?

  • 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-01T20:23:04+00:00Added an answer on June 1, 2026 at 8:23 pm

    That’s what clustered index are for. sqlite doesn’t support them though.

    The following is copied from: http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows

    Four: Clustered Indexes

    SQLite doesn’t support clustered indexes (simply, indexes that force
    the data in the database to be physically laid down in the SAME order
    as the index needs it to be in.)

    This means that if your index is sequential INTEGER, the records are
    physically laid out in the database in that INTEGERs order, 1 then 2
    then 3.

    You can’t make a Clustered index, but you CAN sort your data in order
    so that any historical data is ordered nicely. Of course, as the
    database matures, you lose that, but it helps

    Someone else posted this, and it is a nice example to use, so I will.
    If you have a table WIBBLE whose field KEY you want to access a lot,
    it would be nice if everything was in order. Using the command line
    tool, you can create a fake cluster by doing the following:

    create table wibble2 as select * from wibble;
    delete from wibble;
    insert into wibble select * from wibble2 order by key;
    drop table wibble2;
    

    Bottom line is you can re-order your records manually, but I imagine this would be practical for you only if you don’t intend to write to the table to often.

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

Sidebar

Related Questions

I just want what my title says.I have already read all the previous similar
I want to read the company table and take out all possible suffixes from
I have a specific object with image data. And I want read/write images (in
I'm using a System.Windows.Forms.DataGrid. It is populated with about 3000 rows and redraws very
I have a table of customers. This table can be big, millions of rows.
I have an excel sheet similar to : I want to read data columns
First of all, I am using Postgres 9.1. I have a table named filepaths
I want to read all the contacts from the phone but i am unable
i want to read from a text file in C#. But I want all
I have a text file. I want read that file. But In that if

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.