I’ve noticed that the weblogs_data table contain fields for all possible custom fields (even those not applicable for that entry), and each new custom field modifies the weblog table structure.
I wouldn’t have thought to solve the problem this way. It would have seemed more elegant to create a weblog_field_data table which would have the data for each field for each record. Then you could join the tables together and you’d get a result set of the fields for each entry. As it is now - it seems that either you need to pull all the fields for each entry (which might not be a big deal because they are mostly empty) - or they need to create the weblog_data query based on the weblog_fields result. (I haven’t looked through the code yet to see.. just speculating)
So, since I see that the EllisLabs people seem to know what’s what (I mean, they made codeigniter) - I’m curious why they chose this route? Is it faster or is a left-over from an old design decision? Or is there some other benefit that I don’t understand. The main drawback I see to the approach I’m suggesting is that the weblog_field_data table will have a lot of rows - but I would think with properly indexed tables, that wouldn’t slow things down much.