...
for /f "delims=*" %%A in (mainlog.txt) do (
echo %%A | findstr "ORA Record" >> newfile.txt
....
the above method calls findstr for each line iteration. If there are 10000 lines, then findstr will be called 10000 times, which is inefficient.
better to use it the other way round , ie
for ..... ( findstr "ORA Record" mainlog.txt ) do blah blah
if there are further processing on each line found, or simply pipe to newfile if what OP wants is only to find ORA records
findstr [blah options] "text_to_find" >>newfile