contao/core — Issue #3794: Default value storage in tl_module inefficient?
Author: rogerramjet
Created: 2012-01-10 22:05:15+00:00
State: open

PREAMBLE:
I can't find anything on this - its more a question or point of discussion, and may well be a fault in the way I write my modules - or just something Contao has to do this way
- BUT if not, I'm sure it would lead to decreased database space useage and faster querying times.

Each time a new module is installed, the table tl_module is extended by a few or many fields depending on the complexity of the modules, and how many front-end modules that module adds.

GETTING THERE:
I have a module that stores lots of fields containing data as default values. The thing is, it stores it in those fields for ALL modules that use tl_module, not just in the row of type "my module" - but the other modules don't ever use it.
Some data is small, (boolean or a short string) but quite a lot is larger (serialized arrays) - and I guess some could also potentially be very large (a binary image or video etc)

ISSUE:
So multiply that by lots of modules that store default values in lots of fields each, and surely the database is many times bigger than it needs to be (and therefore slower?).
Is there a way of only storing the default values in the row for my module?