opendatacube / datacube-explorer

Web-based exploration of Open Data Cube collections
Apache License 2.0
56 stars 31 forks source link

Include custom DB enhancements in click commands. #129

Open whatnick opened 4 years ago

whatnick commented 4 years ago

Find a home for this DB enhancement snippet

echo "Clustering $(date)"
psql "${dbname}" -X -c 'cluster cubedash.dataset_spatial using "dataset_spatial_dataset_type_ref_center_time_idx";'
psql "${dbname}" -X -c 'create index tix_region_center ON cubedash.dataset_spatial (dataset_type_ref, region_code text_pattern_ops, center_time);'
echo "Done $(date)"
jeremyh commented 3 years ago

Vacuum commands too, for reference:

vacuum analyze agdc.dataset, agdc.dataset_type, agdc.dataset_source, agdc.metadata_type, agdc.dataset_location, cubedash.dataset_spatial, cubedash.product, cubedash.region, cubedash.time_overview;