Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: Class::DBI not intuitive

by pg (Canon)
on Jul 27, 2004 at 05:08 UTC ( [id://377658]=note: print w/replies, xml ) Need Help??


in reply to Re: Class::DBI not intuitive
in thread Class::DBI not intuitive

"And I think the difference between retrieve and retrieve_all should be obvious just by looking at the name."

itub's explanation was very lucid, and I just want to elaborate a little bit on the quoted comment of his.

Other than the obvious difference implicated by the naming, the real concern is performance. It would be quite unwise to do a retrieve_all, when you only care about couple of rows. Indeed the underlying data system might support batch fetch, for example Oracle, this provides the opportunity to fully utilize this and similar kind of functionalities, in the actual implementation, to gain the best performance.

Replies are listed 'Best First'.
Re^3: Class::DBI not intuitive
by ryantate (Friar) on Jul 27, 2004 at 21:18 UTC
    "... this provides the opportunity to fully utilize this and similar kind of functionalities, in the actual implementation, to gain the best performance."

    Does anyone know if Class::DBI actually does this? (Uses optimal implementation-specific functionality, for example in Oracle?)

    I read perldoc Class::DBI and the explanation for retreive_all doesn't say whether it does so. One of the reasons I have avoided Class::DBI is I worry its SQL must be heavily suboptimal to facilitate operation on everything from SQLite to Oracle. I remember reading a comment on PM from someone who was monitoring Class::DBI SQL queries in real time and reported being mildly horrified (I have never been able to find the post).

      There is Class::DBI::Oracle which could be used also, in place of Class::DBI (it subclasses Class::DBI).

      If/where you find sub-optimal SQL in Class::DBI, simply replace it inside Class::DBI::Oracle. When you've made some nice improvements, send in a patch so the rest of us can benefit.

      Look at Class::DBI as a starting point rather than an ending point.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-18 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found