Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: How to improve MYSQL search performance of perl?

by davidrw (Prior)
on Aug 24, 2005 at 17:17 UTC ( [id://486297]=note: print w/replies, xml ) Need Help??


in reply to Re^4: How to improve MYSQL search performance of perl?
in thread How to improve MYSQL search performance of perl?

Can you post your revised code? Are you re-using the statement handle? What's the error in the error_log (or if you run on command line)?

Also, try adding $|=1; in your script to make sure it's not buffereing so yuo'll see output as it's happening.

If the loop to execute the queries is good now (resuing handles, etc), then this probably just goes back to the issue mentioned elsewhere in this thread about SQL performance .. the speed will depend entirely on your SQL, table schema, and indexes (can you provide any of those?).

Replies are listed 'Best First'.
Re^6: How to improve MYSQL search performance of perl?
by nan (Novice) on Aug 25, 2005 at 16:01 UTC

    Hi,

    After reading through Chapter 10 in MySQL Reference Manual, I'm trying to rebuild the table and index and I'll let you know what happens after that.

    Actually, the error log just says "personal.pl: Unrecognized escape \\h passed through at F:/httpserv/Top/cgi-bin/personal.pl line 11., referer: http://localhost/form.html" but the line 18 is about database connection:

    my $dbh = DBI->connect('DBI:mysql:diet', $ref) || die "Failed to connect: $DBI::errstr";

    And it's weird that the script works fine without using Apache server...

    Many thanks,

    Nan

      error says line 11, you say that line 18 is the DBI connect line... can you provide the whole (or at least top section) of the script? If you search, is there a " \h" anywhere (in a windows-style filename maybe)?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://486297]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 22:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found