I'm trying to understand design tradeoffs in SQLite database design.
Specifically, are there significant losses in efficiency when querying across multiple database files? And/or are there other design considerations regarding a single db file vs. separate files?
I know you can use the ATTACH statement to allow queries that span over multiple database files, but is this a good idea in general? If it's nearly as efficient as keeping all the data in a single file, it seems nice from an organizational standpoint to separate them. I'm just looking for some rule-of-thumb or perhaps a link to a resource describing this type of design consideration. I've spent a few hours looking, but haven't found anything.
(over)-simplified example scenario:
users.db, data1.db, data2.db, data3.db, etc
The users.db file is fairly small. Number of records perhaps only in the hundreds. But the dataN.db files will be much larger, with numbers of records in the 100s of thousands. Perhaps more, eventually.
But, imagine a very low-powered processor. Think Internet-of-Things. So there are potentially very real efficiency considerations.
Aucun commentaire:
Enregistrer un commentaire