0

I have very big database (.db) file on my system (>20 GB) which holds aprrox 500 tables and some tables have billion records.

This database I am going to use by C# program.

I have prepared queries which going to execute over these database and fetch records. I also written INDEXING queries to execute over this database.

Below is the First step which making connection to the Database.

 string fullPath = "D:\\Example.db"

            using (SQLiteConnection con = new SQLiteConnection("Data Source=" + fullPath + ";Version=3;Count Changes=off;Journal Mode=off;Pooling=true;Cache Size=10000;Page Size=4096;Synchronous=off"))
            {
                con.Open(); 
                ....
                ....
}
  • Can I still able to increase the Cache size ?
  • Can I still increase Page size ?
  • Shall I missing any other parameters ?

I am executing queries in loop so Can I able to release CACHE size through some commands ?

2 Answers 2

1

You can change the cache size at any time with PRAGMA cache_size. However, this will not have much of an effect because the operating system will use any free memory to keep the databse file in the file cache.

The page size must be set before the database file is actually created. Increasing the page size might help, but the effect is likely to be very small with such a large database where the runtime is dominated by I/O.

When you write queries that need to read gigabytes of data from the database, these queries will always be slow.

Sign up to request clarification or add additional context in comments.

Comments

0

I do understand that it's limitation to use big volume of database with SQLLite, so I have migrated my database with Oracle database.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.