We present a near-tight analysis of the average "query complexity"-à la Nguyen and Onak [FOCS'08]-of the randomized greedy maximal matching algorithm, improving over the bound of Yoshida, Yamamoto and Ito [STOC'09]. For any n-vertex graph of average degree d, this leads to the following sublinear-time algorithms for estimating the size of maximum matching and minimum vertex cover, all of which are provably time-optimal up to logarithmic factors:This (nearly) matches an Ω(n) time lower bound for any multiplicative approximation and is, notably, the first (2 + ε)-approximation that runs in o(n 2 ) time for all graphs.• A (2, εn)-approximation in O(( d + 1)/ε 2 ) time using adjacency list queries. This (nearly) matches an Ω( d+1) lower bound of Parnas and Ron [TCS'07] which holds for any (O(1), εn)-approximation, and improves over the bounds of Yoshida et al. [STOC'09], Onak, Ron, Rosen, and Rubinfeld [SODA'12], and Kapralov, Mitrovic, Norouzi-Fard, and Tardos [SODA'20]: The former two take at least quadratic time in the degree and so can take Ω(n 2 ) time, and the latter obtains a much larger approximation.• A (2, εn)-approximation in O(n/ε 3 ) time using adjacency matrix queries. This (nearly) matches an Ω(n) time lower bound in this model and improves over the O(n √ n)-time (2, εn)-approximate algorithm of Chen, Kannan, and Khanna [ICALP'20]. It also turns out that any non-trivial multiplicative approximation in the adjacency matrix model requires Ω(n 2 ) time, so the additive εn error is necessary too.As immediate corollaries, one can obtain improved sublinear time estimators for the size of (variants of) TSP by plugging the third result into the framework of Chen et al. [ICALP'20]. Additionally, our improved analysis of randomized greedy maximal matching gives an improved maximal matching algorithm in the Adaptive Massively Parallel Computation (AMPC) model.