-
-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource Hints 2021 query amends #2408
Conversation
hint.name AS name, | ||
hint.attribute AS attribute, | ||
COUNTIF(hint.value IS NOT NULL) AS freq, | ||
SUM(COUNT(0)) OVER (PARTITION BY _TABLE_SUFFIX, hint.name, hint.attribute) AS total, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Partitioning by everything in the GROUP BY
is effectively the same as just COUNT(0)
. Did you mean to partition only by client and name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the total value you're going for, eg total number of instances per client/name/attribute combo? instances per client/name combo?
If the first one, I think SUM(COUNT(0)) OVER ()
is equivalent to COUNT(0)
since there's only ever one count per combination to sum. If the second one, you'd need to remove the attribute from the partition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Rick. I have pushed an update with what I believe is the best implementation. Using client/name combo will show the number of times the attribute was used when the rel=preload
per client.
Note that this query isn't very important and I only added it to substantiate my claim that imagesrcset
isn't widely used.
…of preloads as denominator
Progress on #2158
consoleLog_missing_crossorigin.sql
toconsoleLog_incorrect_crossorigin.sql
consoleLog_missing_crossorigin_type.sql
toconsoleLog_incorrect_crossorigin_type.sql
WHERE hints.preload
to consoleLog queries to only look at pages which have at least onerel="preload"
imagesrcset
andimagesizes
onrel="preload"