Bookworm-project / BookwormDB

Tools for text tokenization and encoding
MIT License
84 stars 12 forks source link

Cannot handle more than 32 unique variables on first ingest #76

Open bmschmidt opened 9 years ago

bmschmidt commented 9 years ago

Because MySQL limits to 64 indexes per table, any more than 32 unique variables in the metadata will cause the catalog to collapse.

Will also apply to trying to add more than 32 new fields at a time.

Possible fixes: essentially just wrap around the code that already supports adding a new tsv for as much of the data as necessary.

bmschmidt commented 9 years ago

One easy solution to this would be that if there are more than 10 or so unique variables, just start tagging the later ones as not unique. For most purposes, this will be transparent; it's acceptable to have a non-unique key where there happens to be a single entry for each item. There's just some minor overhead--certain queries require more joins if they have to look in different tables, which is suboptimal.