in reply to Optimizing string searches
if files reside on multiple machines - run search on the seperate machines if possible.
if files reside on a single machine - process them locally.
do not open files across the network.
suggest:
create a list of log files
loop open log files
loop read current file
regex string1 (if match write ouput)
regex string2 (if match ...)
regex string3 (if match ...)
regex string4 (if match ...)
next record
next log file
assumes: will only parse the log files for these 4 strings. there will be no reason to search the same logfiles again for other strings.
Enjoy!
Dageek
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Optimizing string searches
by moritz (Cardinal) on Sep 05, 2008 at 18:58 UTC | |
by johndageek (Hermit) on Sep 11, 2008 at 13:46 UTC | |
|
Re^2: Optimizing string searches
by cool256 (Initiate) on Sep 05, 2008 at 20:54 UTC |