Yes, I had to add some indexes to a lot of the tables... also I made a small change to the code and now it works super fast:
my $_sql = "select * from $_k LIMIT 1";
my $sth = $dbh->prepare($_sql);
$sth->execute();
my @_mb2 = @{$sth->{NAME}};
$sth->finish();
adding LIMIT 1 to the select statement seems to have made a huge difference...
Anyhow, thank you for your assistance!
And yes, I hate rushing in my programming, but they needed this built as quick as possible as they had 394 member dying to make a purchase and had orders already on the books so needed it done. I built it in 20 days or so and got all the members and their orders imported... The website brings in about 700k per month now in sales, so I'm glad it is working so well, but it could use some major overhaul on it... something I will have to do down the road.
I don't know why I did not think of making sure the indexes were created on the database...
Anyways, thank you again.
Richard