From 30641911a96c35a210cb6c4903dab0e60086bfdf Mon Sep 17 00:00:00 2001 From: Dave Smart Date: Wed, 12 Nov 2025 08:37:25 +0000 Subject: [PATCH 1/3] corrects filename for response_media_file_type_distribution.sql --- ...distribution.sql => response_media_file_type_distribution.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sql/2025/page-weight/{response_media_file_type.distribution.sql => response_media_file_type_distribution.sql} (100%) diff --git a/sql/2025/page-weight/response_media_file_type.distribution.sql b/sql/2025/page-weight/response_media_file_type_distribution.sql similarity index 100% rename from sql/2025/page-weight/response_media_file_type.distribution.sql rename to sql/2025/page-weight/response_media_file_type_distribution.sql From 43777716056d2197a23ab20b3bddd44556d7f929 Mon Sep 17 00:00:00 2001 From: Dave Smart Date: Wed, 12 Nov 2025 08:38:08 +0000 Subject: [PATCH 2/3] adds use-efficient-cache-lifetimes.sql lighthouse metric query --- .../use-efficient-cache-lifetimes.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sql/2025/page-weight/use-efficient-cache-lifetimes.sql diff --git a/sql/2025/page-weight/use-efficient-cache-lifetimes.sql b/sql/2025/page-weight/use-efficient-cache-lifetimes.sql new file mode 100644 index 00000000000..86a758fbdc8 --- /dev/null +++ b/sql/2025/page-weight/use-efficient-cache-lifetimes.sql @@ -0,0 +1,18 @@ +-- looks at the distribution of wasted bytes from resources identified by the Lighthouse "Use Efficient Cache Lifetimes" audit +-- https://developer.chrome.com/docs/performance/insights/cache +SELECT + percentile, + client, + --get the wasted bytes from resources that could be cached longer, in KB + APPROX_QUANTILES((CAST(JSON_VALUE(lighthouse.audits['uses-long-cache-ttl'].numericValue) AS FLOAT64) / 1024), 1000)[OFFSET(percentile * 10)] AS wasted_kb +FROM + `httparchive.crawl.pages`, + UNNEST([10, 25, 50, 75, 90, 100]) AS percentile +WHERE + date = '2025-07-01' +GROUP BY + percentile, + client +ORDER BY + client, + percentile From 60247de89891ae0c7b6d84f693786b91ecf86e81 Mon Sep 17 00:00:00 2001 From: Dave Smart Date: Wed, 12 Nov 2025 09:47:28 +0000 Subject: [PATCH 3/3] group root and internal pages --- sql/2025/page-weight/use-efficient-cache-lifetimes.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sql/2025/page-weight/use-efficient-cache-lifetimes.sql b/sql/2025/page-weight/use-efficient-cache-lifetimes.sql index 86a758fbdc8..d92efd96314 100644 --- a/sql/2025/page-weight/use-efficient-cache-lifetimes.sql +++ b/sql/2025/page-weight/use-efficient-cache-lifetimes.sql @@ -3,6 +3,7 @@ SELECT percentile, client, + is_root_page, --get the wasted bytes from resources that could be cached longer, in KB APPROX_QUANTILES((CAST(JSON_VALUE(lighthouse.audits['uses-long-cache-ttl'].numericValue) AS FLOAT64) / 1024), 1000)[OFFSET(percentile * 10)] AS wasted_kb FROM @@ -12,7 +13,9 @@ WHERE date = '2025-07-01' GROUP BY percentile, - client + client, + is_root_page ORDER BY client, + is_root_page, percentile