As I have learned in this community, one way to import a hefty data files (e.g. millions of rows of {x1, y1} data) if you don't care about the individual elements (maybe just want to obtain some statistics) is to use the following:
s = OpenRead["path/test.dat"];
p = Sort[RandomSample[Range[5 10^5], 100000]];
dataTable = ((If[#1 != 1, Skip[s, Record, #1 - 1], Null];
ReadList[s, Number, 2]) &) /@ Differences[Prepend[p, 0]];
which assumes that the length of "test.dat" is 500000 and we randomly sample only 100000 items.
I am now in want of a slightly different function. I'd like to take just the ordered pairs of "test.dat" such that x1 < x0 but this time take all of them and not random ones.
I can do this by importing the whole table and then using something like Cases
to get the desired range but importing the entire table is exactly what I want to avoid since the tables are very very large.