Order Tray | Contact Us | Home | SIG Lists

[aprssig] High speed datbase inserts (feedback/ re-think)

Andrew Rich (VK4TEC) vk4tec at tech-software.net
Wed Mar 2 19:39:37 UTC 2005


I am using Telnet.pm and DBI;

the script is at work but here is the main gist

#!/usr/bin/perl
use DBI;
use Net::Telnet;
my $database_handler = DBI->connect
("DBI:mysql:aprs:host=12.96.167.22","guest","");
my $host = "third.aprs.net";
my (@data, $line);
my $t = new Net::Telnet(Timeout=> '5', port => '10152') ;
$t->errmode('return');
$t->Net::Telnet::open($host);
sleep 5;
print $t "user VK4TEC pass 21694 vers UI-View32 V1.92\n";
while (<$t>)
{
print;
@data = split(/,/);
$sql ="insert into data values ('$data[0]','$data[1]')";
$statement_handler->execute;
}
print "Bomb out";

I have seen the script stop (for the duration of the other select
statements going on) and say "Bomb out";

But it ONLY does it when i do something else on mysql that stops this
script from having 100% access

I even tried 

while (<$t>)
{
print;
@data = split(/,/);
$sql ="insert delayed into data values ('$data[0]','$data[1]')";
$statement_handler->execute;
}

Slowed down and was intermittenant. But bombed out some times.

The data is FAST coming in 











More information about the aprssig mailing list