Hello, Thanks
The grep regex on the text file found around 10,000 lines over 5 minutes (out of a total possible 200,000 rows), at which time I stopped it, interesting experiment anyway :-) Using OR instead of UNION in Mysql is definitely slower, although maybe, as someone has mentioned above, the Sqlite optimizer works better with OR. Will try that next. Thanks. > Try this: > > (1) ditch the redundant commas in your csv file > (2) run this (suitably adjusted for my errors and typos, and for my > ignorance of the minutiae of command-line and grep syntax on your > [unspecified IIRC] OS): > > grep > "(....W[CEF][SZ]|..W[CEF]S|...W[CEF]S|W[3CEF]S[25]..|W3S..|.11[CEF]S.)," > yourfile.csv > > How long does that take? > > Another suggestion: search for clues on whether it might be better > instead of doing > select * from mytable where <critera1> > union all > etc etc > select * from mytable where <criteria7> > to do > select * from mytable where <criteria1> or <criteria2> or etc etc > and if you don't find a strong weight of opinion for one way or the > other, give it a try. > > HTH, > > John > > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

