diff --git a/src/spaceone/cost_analysis/manager/cost_manager.py b/src/spaceone/cost_analysis/manager/cost_manager.py index bc81988..1309f11 100644 --- a/src/spaceone/cost_analysis/manager/cost_manager.py +++ b/src/spaceone/cost_analysis/manager/cost_manager.py @@ -147,6 +147,7 @@ def analyze_costs(self, query, domain_id, target="SECONDARY_PREFERRED"): _LOGGER.debug(f"[analyze_costs] query: {query}") query = self._change_filter_project_group_id(query, domain_id) + query["hint"] = "COMPOUND_INDEX_FOR_SEARCH" return self.cost_model.analyze(**query) def analyze_monthly_costs(self, query, domain_id, target="SECONDARY_PREFERRED"): diff --git a/src/spaceone/cost_analysis/model/cost_model.py b/src/spaceone/cost_analysis/model/cost_model.py index e395c34..6d9430f 100644 --- a/src/spaceone/cost_analysis/model/cost_model.py +++ b/src/spaceone/cost_analysis/model/cost_model.py @@ -62,9 +62,10 @@ class Cost(MongoModel): "fields": [ "domain_id", "data_source_id", - "-billed_date", "workspace_id", "project_id", + "product", + "-billed_date", "cost", ], "name": "COMPOUND_INDEX_FOR_SEARCH",