CREATE INDEX auth_user_username_idx ON auth_user( username );

CREATE INDEX metadata_tag_name_idx ON metadata_tag( name );
CREATE INDEX metadata_tag_value_idx ON metadata_tag( value );
CREATE INDEX metadata_tag_raster_entry_id_idx ON metadata_tag( raster_entry_id );

CREATE INDEX metadata_xml_namevalue_idx ON metadata_xml( namevalue );
CREATE INDEX metadata_xml_raster_entry_id_idx ON metadata_xml( raster_entry_id );

CREATE INDEX raster_data_set_repository_id_idx ON raster_data_set( repository_id );

CREATE INDEX raster_entry_acquisition_date_idx ON raster_entry( acquisition_date );
CREATE INDEX raster_entry_raster_data_set_id_idx ON raster_entry( raster_data_set_id );
--ALTER TABLE raster_entry DROP COLUMN ground_geom;
--SELECT AddGeometryColumn( 'raster_entry', 'ground_geom', 4326, 'POLYGON', 2 );
--CREATE INDEX raster_entry_ground_geom_idx ON raster_entry USING GIST ( ground_geom GIST_GEOMETRY_OPS );

CREATE INDEX raster_entry_file_name_idx ON raster_entry_file( name );
CREATE INDEX raster_entry_file_type_idx ON raster_entry_file( type );
CREATE INDEX raster_entry_file_raster_entry_id_idx ON raster_entry_file( raster_entry_id );

CREATE INDEX raster_file_format_idx ON raster_file( format );
CREATE INDEX raster_file_name_idx ON raster_file( name );
CREATE INDEX raster_file_raster_data_set_id_idx ON raster_file( raster_data_set_id );
CREATE INDEX raster_file_type_idx ON raster_file( type );

CREATE INDEX requestmap_url_idx ON requestmap( url );

CREATE INDEX repository_base_dir_idx ON repository( base_dir );

CREATE INDEX role_authority_idx ON role( authority );

CREATE INDEX search_tag_name_idx ON search_tag( name );

CREATE INDEX video_data_set_end_date_idx ON video_data_set( end_date );
CREATE INDEX video_data_set_start_date_idx ON video_data_set( start_date );
CREATE INDEX video_data_set_repository_id_idx ON video_data_set( repository_id );
--ALTER TABLE video_data_set DROP COLUMN ground_geom;
--SELECT AddGeometryColumn( 'video_data_set', 'ground_geom', 4326, 'POLYGON', 2 );
--CREATE INDEX video_data_set_ground_geom_idx ON video_data_set USING GIST ( ground_geom GIST_GEOMETRY_OPS );

CREATE INDEX video_file_format_idx ON video_file( format );
CREATE INDEX video_file_name_idx ON video_file( name );
CREATE INDEX video_file_type_idx ON video_file( type );

