Permalink
Browse files

add indexes to unit_link_stat

  • Loading branch information...
1 parent 12a979c commit 95acc4d3ebbb465a88f103c5575973743471264e @mykmo committed Jan 13, 2011
Showing with 5 additions and 2 deletions.
  1. +3 −0 mbbd/sql/table.sql
  2. +2 −2 upgrade/to0.0.9/script.sql
View
3 mbbd/sql/table.sql
@@ -147,3 +147,6 @@ create table unit_link_stat (
unique (unit_id, gwlink_id, point)
);
+create index unit_link_stat_unit_id_index on unit_link_stat (unit_id);
+create index unit_link_stat_hour_no_index on unit_link_stat (point);
+
View
4 upgrade/to0.0.9/script.sql
@@ -69,8 +69,8 @@ set enable_seqscan to false;
select migrate('unit_stat', 'temp_stat');
drop function migrate (text, text);
-drop index unit_stat_unit_id_index;
-drop index unit_stat_hour_no_index;
+alter index unit_stat_unit_id_index rename to unit_link_stat_unit_id_index;
+alter index unit_stat_hour_no_index rename to unit_link_stat_hour_no_index;
alter table unit_stat rename to unit_link_stat;
alter table temp_stat rename to unit_stat;

0 comments on commit 95acc4d

Please sign in to comment.