# Null values in num\_scripts\_sync and num\_scripts\_async

**URL:** <https://discuss.httparchive.org/t/null-values-in-num-scripts-sync-and-num-scripts-async/1396>\
**Category:** Uncategorized\
**Created:** [June 27, 2018, 5:03pm UTC](https://discuss.httparchive.org/t/null-values-in-num-scripts-sync-and-num-scripts-async/1396 "2018-06-27T17:03:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![raghuramakrishnan](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/raghuramakrishnan/32/924_2.png) [@raghuramakrishnan](https://discuss.httparchive.org/u/raghuramakrishnan)\
**Post date:** [June 30, 2018, 3:22am UTC](https://discuss.httparchive.org/t/null-values-in-num-scripts-sync-and-num-scripts-async/1396/2 "2018-06-30T03:22:46Z")

</div>

The req\_host field in the summary\_requests also seems to be having missing values.

**numDomains from summary\_pages**  
SELECT url, pageid, numDomains, wptid, wptrun  
FROM  
`httparchive.summary_pages.2018_01_01_desktop`  
where pageid = 84767573

![image](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/2X/f/f5ffe6b4c443efe5084348cae3e1b5933ac29d7f.png)

**numDomains calculated from summary\_requests**  
SELECT COUNT(DISTINCT(req\_host)) distinctReqHost  
FROM  
`httparchive.summary_requests.2018_01_01_desktop`  
where pageid = 84767573

![image](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/2X/9/94f422bc85d15729d5d73c5bf45470a8e192208b.png)

Looking at the req\_host values in the summary\_requests table show that some of the req\_host values are missing, leading to this mismatch.  
A previous post on calculating the 1st vs 3rd party requests depends on the req\_host field values [https://discuss.httparchive.org/t/what-is-the-distribution-of-1st-party-vs-3rd-party-resources/100](https://discuss.httparchive.org/t/what-is-the-distribution-of-1st-party-vs-3rd-party-resources/100).  
In the above example, 244 out of 423 have blank req\_host values.

**Revised numDomains calculated from summary\_requests**  
Was able to fill out the missing values by using the following query and get a value matching numDomains (in the 1st and 3rd party query, replaced req\_host by the extraction expression).  
SELECT COUNT(DISTINCT (SUBSTR(REGEXP\_EXTRACT(url, r’([:]//[a-z0-9-.\_~%]+)’), 4))) actualDistinctReqHost  
FROM  
`httparchive.summary_requests.2018_01_01_desktop`  
where pageid = 84767573

![image](https://canada1.discourse-cdn.com/flex035/uploads/httparchive/original/2X/f/f8eb303fc98f4eb479d25642773b754eaa73f510.png)

@rviscomi is there something I am missing out on the req\_host, num\_scripts\_sync, num\_scripts\_asynch?

---

_[View the full topic](https://discuss.httparchive.org/t/null-values-in-num-scripts-sync-and-num-scripts-async/1396)._
