Quite a while. You cannot compare total numbers. TV networks don't care about those.
TV networks care about demographics, particularly demographics mostly attractive to advertisers. And Raw is a live program (not taped) that appeals to the correct demographics and does comparatively well in the ratings. They are going to be just fine.
Not to be THAT person, but Raw was not getting 6's (or even 5's regularly) a decade ago. If they got a rating in the 4s, it was a good night.
Source
That said, your overall point is correct. It's not about total numbers, it is about comparative numbers in demographics.