Closed Bug 522104 Opened 15 years ago Closed 15 years ago

Unnecessary "text" data type on statistics DB table

Categories

(addons.mozilla.org Graveyard :: Statistics, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: dre, Assigned: clouserw)

Details

The download_counts table was altered in bug 516044 to add a new column, "src".  This column was requested as size TEXT, and I just wanted to call out that is way too large of a size for it.

The Metrics ETL process that populates the column restricts the input to 70 characters, so you could safely resize it as VARCHAR(70) and not risk losing any data.

The downsides of storing it as text are:
1. Indexing is much more expensive
2. text data is stored in a separate area making queries that return text and non-text data much more inefficient
3. General bloat of the DB.
Assignee: nobody → clouserw
Target Milestone: --- → 5.3
Oops.  Turns out I was mistaken about the type of data that was supposed to be stored in this field.  I thought it was single values, but fligtar was expecting it to be a serialized JSON blob.  Given that, the TEXT data type makes more sense.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.