diff options
Diffstat (limited to 'util/stats/dbinit.py')
-rw-r--r-- | util/stats/dbinit.py | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/util/stats/dbinit.py b/util/stats/dbinit.py index 8f7608bba..036941675 100644 --- a/util/stats/dbinit.py +++ b/util/stats/dbinit.py @@ -100,28 +100,6 @@ class MyDB(object): ) TYPE=InnoDB''') # - # We keep the bin names separate so that the data table doesn't get - # huge since bin names are frequently repeated. - # - # COLUMNS: - # 'id' is the unique bin identifer. - # 'name' is the string name for the bin. - # - # INDEXES: - # 'bin' is indexed to get the name of a bin when data is retrieved - # via the data table. - # 'name' is indexed to get the bin id for a named bin when you want - # to search the data table based on a specific bin. - # - self.query(''' - CREATE TABLE bins( - bn_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, - bn_name VARCHAR(255) NOT NULL, - PRIMARY KEY(bn_id), - UNIQUE (bn_name) - ) TYPE=InnoDB''') - - # # The stat table gives us all of the data for a particular stat. # # COLUMNS: @@ -222,14 +200,12 @@ class MyDB(object): # 'run' is the run that the data was generated from. Details up in # the run table # 'tick' is a timestamp generated by the simulator. - # 'bin' is the name of the bin that the data was generated in, if - # any. # 'data' is the actual stat value. # # INDEXES: # 'stat' is indexed so that a user can find all of the data for a # particular stat. It is not unique, because that specific stat - # can be found in many runs, bins, and samples, in addition to + # can be found in many runs and samples, in addition to # having entries for the mulidimensional cases. # 'run' is indexed to allow a user to remove all of the data for a # particular execution run. It can also be used to allow the @@ -242,11 +218,10 @@ class MyDB(object): dt_y SMALLINT NOT NULL, dt_run SMALLINT UNSIGNED NOT NULL, dt_tick BIGINT UNSIGNED NOT NULL, - dt_bin SMALLINT UNSIGNED NOT NULL, dt_data DOUBLE NOT NULL, INDEX (dt_stat), INDEX (dt_run), - UNIQUE (dt_stat,dt_x,dt_y,dt_run,dt_tick,dt_bin) + UNIQUE (dt_stat,dt_x,dt_y,dt_run,dt_tick) ) TYPE=InnoDB;''') # @@ -398,12 +373,6 @@ class MyDB(object): WHERE dt_stat IS NULL''') self.query(''' - DELETE bins - FROM bins - LEFT JOIN data ON bn_id=dt_bin - WHERE dt_bin IS NULL''') - - self.query(''' DELETE events FROM events LEFT JOIN runs ON ev_run=rn_id |