Hello,
For Hawkular Metrics the speed of writes is always more important than the speed of reads (due to a variety of reasons). But that only works up to a certain extent, in the sense that we cannot totally neglect the read part. Let me see if I can narrow the impact of your proposal ...
You made a very good point that the performance of reads is not affected if we discard metrics_idx for endpoints that require the metrics id. We only need to consider the impact of querying for metrics and tenants since both use metrics_idx. Querying the list of tenants is not very important because it is an admin feature that we will soon secure via the newly proposed "admin framework". So only querying for metrics definitions will be truly affected by removing the metrics_idx completely. But only a portion of those requests are affected because tags queries use the tags index.
To conclude, metrics_idx is only important in cases where the user wants a full list of all metrics ever stored for a tenant id. If we can profile the performance impact on a larger set of metric definitions and we find the time difference without the metrics_idx is negligible then we should go forward with your proposal.
John Sanda, do you foresee using metrics_idx in the
context of metric aggregation and the job scheduling framework that
you've been working on?