Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How to count rows using DBI & mysql - Performance results

by DrZaius (Monk)
on Jun 11, 2001 at 19:16 UTC ( #87526=note: print w/ replies, xml ) Need Help??


in reply to How to count rows using DBI & mysql - Performance results

First off, if you want your code at all portable, do not use REPLACE. It is mysql specific (as far as I know).

Next, indexes are great. Try EXPLAINing your queries. That will give you a clue on what is going down.

Finally, make a function to check if the id exists and memioze it. This is essentially creating a perl cache, but it is transparent to you.


Comment on Re: How to count rows using DBI & mysql - Performance results
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2015-07-05 04:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls