aws-samples / aws-samples/amazon-redshift-cost-attribution

Duplicate query_id in redshift_query_attribution_vw

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Description

I applied these views to my cluster, and I notice that there are rows with same _query_id_ in the view `redshift_query_attribution_vw`

List of duplicate query_id:
```
SELECT query_id, COUNT(*)
FROM redshift_query_attribution_vw
GROUP BY query_id
HAVING COUNT(*) > 1;
```
Results
image

---------
Check details of a duplicated query_id

```
SELECT query_id, db_user_id, redshift_query_cost
FROM redshift_query_attribution_vw
where query_id = 164726352;
```
image

Why are there these duplicate values?
Does it mean the cost of the query equals the sum of all _redshift_query_cost_ of that query_id in the view?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.