开发者

Joins vs more columns

开发者 https://www.devze.com 2023-03-31 07:05 出处:网络
I plan to have up to 50000 items in an SQLite database for my Android app. I am considering breaking up a 15 column table to remove redundancy. I thought joining three separate tables would be more 开

I plan to have up to 50000 items in an SQLite database for my Android app. I am considering breaking up a 15 column table to remove redundancy. I thought joining three separate tables would be more 开发者_JS百科inefficient on a low power device (Android 2.1 devices) than storing redundant data and indexing it properly.

Does anyone have experience or resources for Android? I found nothing about redundant data vs triple inner-joins. Most of the queries will need to do a double inner-join at least if I break it up properly. Any data needed that can help explain this more?


A lot of it does depend on your table scheme however I understand you may not be able to post that here. I would personally go with breaking the table up into multiple tables instead of having one table with a lot of redundant data. I've done something similar and actually saw faster queries. Also, the speed of phones are increasing dramatically so its really worth having a cleaner database structure.

0

精彩评论

暂无评论...
验证码 换一张
取 消