C
ChUIMonster
Guest
I may regret saying this but... I am generally a fierce advocate of normalization but there are times when an array is a significant performance advantage. I have a particular use case where I could either have 50 to 100 records that all share the same leading key component (a timestamp) and are the distinguished by a "type" field that is essentially an array index. Or I could have one record with and extent of X and decide on a mapping of those indexes to array positions. Making the array much bigger than it needs to be has no serious impact on storage and allows me to add new mappings easily. The extent based approach is much, much more efficient in terms of disk space, memory usage and performance. Keep in mind that this is a special case where the trade-offs were carefully considered and tested. Not a standard approach or a recommendation for such.
Continue reading...
Continue reading...