Skip navigation links

MySQL Forums :: Perl :: Problem with timeout issues with mysql code in Perl


Advanced Search

Re: Problem with timeout issues with mysql code in Perl
Posted by: Richard Jones ()
Date: December 12, 2008 01:43AM

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

Options: ReplyQuote


Subject Written By Posted
Problem with timeout issues with mysql code in Perl Richard Jones 12/11/2008 06:48AM
Re: Problem with timeout issues with mysql code in Perl Randy Clamons 12/11/2008 11:39AM
Re: Problem with timeout issues with mysql code in Perl Richard Jones 12/12/2008 01:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.