I have just one abhorrend table, no index, no keys, no IDs, no order, 25 columns, 19 million rows. I am using the SQL-ish language named TaQL ("Table Query Language").
I need to select-from-where ... It sounds no problem! However the WHERE conditions are 1683 sets of simple conditions:
set#1: columnA>num1 and columnB>num2 and columnC<num3 and columnD>=num4 ... or set#2: columnA>num189 and columnB>num274 and columnC<num321 and columnD>=num457 ... or set#n: ... or set#1683: ....
My current code is working fine, but it has 1683 lines in the WHERE statement. I created it by awk and regular expressions.
Is there an elegant way to reduce such enormous code?