Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: A profiling surprise ...

by Limbic~Region (Chancellor)
on May 23, 2008 at 19:17 UTC ( #688196=note: print w/replies, xml ) Need Help??


in reply to A profiling surprise ...

chexmix,
IO tends to be an overshadowing bottle neck. This is the nature of the beast. You may want to read:

I disagree with the other monk in the thread that said to move as much as possible away from the DB. In general, you want to reduce the number of times that you ask the database to do work for you. The work that you do leave for the DB should be work that the DB is good at. For instance, don't sort your records in perl land if it makes sense to use an "order by" clause.

You should also recognize that DBI is a pretty heavy API even though great work continue to goes into optimizations. The abstraction layer between you and the DB which makes you able to write programs faster also means the program runs slower.

Without seeing the code nor data, it is hard to provide more than general advice. The code you indicated sounds like it would easily fit into <readmore> tags. If you want specific help - share the code.

Cheers - L~R

Replies are listed 'Best First'.
Re^2: A profiling surprise ...
by chexmix (Hermit) on May 23, 2008 at 20:46 UTC
    Limbic~Region,

    Thanks. I will read those linked documents and see how they simmer.

    Silly question regarding the posting of code ... I suppose I need to ask internally where I work, but has there ever been a case of someone posting code here and getting in hot water at work for doing so? I'm probably just being paranoid, but visions of sugar-plum non-disclosure statements are dancing in my head.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2021-01-25 00:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?