in reply to Re^2: Better way to work with large TSV files?
in thread Better way to work with large TSV files?

$sth->prepare( "INSERT INTO Blah ( a, b, c ) VALUES ( ?, ?, ? )" ); tie *TSV, 'File::ReadBackwards', $filename; while( <TSV> ) { my @insert = processRow( $_ ); $sth->execute( @insert ); truncate $filename, tell TSV; } close TSV; unlink $filename unless $errors;

Makeshifts last the longest.

Replies are listed 'Best First'.
Re^4: Better way to work with large TSV files?
by radiantmatrix (Parson) on Aug 24, 2004 at 13:39 UTC
    I've tried this out, given the speed at which I was able to modify my existing code to work that way. The cpan://File::ReadBackwards module works tremendously well, with far less of a processor hit. I've noted a speed improvement of abour 500%!

    Thank you, Aristotle; I never would have found that module.

    --
    $me = rand($hacker{perl});