Should I sub-sample very large datasets to run the Kolmogorov-Smirnov (KS) test? I have two lists with many millions of values (one has 21,410,024,757 values and the other 10,561,427 values). When I run the two-sample KS test the p-value is 0, but many posts suggest that for such large datasets the KS test isn't reliable, e.g:
Kolmogorov-Smirnov test statistic interpretation with large samples
Is it a good approach to sub-sample the two lists of values randomly and uniformly?

I wonder, how you have such a huge data. Any way, as I understand, your primary interest is to know whether the distribution pattern is same in both the data or not?
I think, it is better, if you resort to some sort of sampling.
it is not always possible to enumerate the entire population or huge population and as is not cost-effective, sampling is always advocated.  I suggest that you have relatively a small random sample of the data ( say 10,000 each) and then go for the analysis.
Form a frequency distribution for both the sampled data and then go for K-S test or the Chi-square test, as desired.
