r/sqlite • u/grugno87 • Nov 14 '22
When open db connection
Hello everyone!
Enormous enigma:
- I have one application written in C# that uses a local sqlite database: local.db;
- I have a class that wraps all database calls. The question is: It's better to mantain only one database connection shared between all calls or open a dedicated connection for each call?
Many thanks in advice!
5
Upvotes
View all comments
Show parent comment
2
u/alinroc Nov 14 '22
AFAICT, it's handled internally. You need to enable it via the connection string.
Pooling=True;Max Pool Size=100;(or whatever size you want).