Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: MySQL DBI Help

by CubicSpline (Friar)
on Sep 22, 2001 at 20:40 UTC ( [id://114074]=note: print w/replies, xml ) Need Help??


in reply to MySQL DBI Help

Why don't you handle this from within your script? If all you want is to print out 30 email addresses per page, just select all the addresses and only print out 30 at a time. The way you've set up your database really limits your options of pulling out data.

Replies are listed 'Best First'.
Re: Re: MySQL DBI Help
by suaveant (Parson) on Sep 22, 2001 at 20:46 UTC
    If he really wants to deals with multiple thousands of email addresses, this probably isn't the best way to go. I almost always use the features of the DB if I can, since it tends to be much faster and means my script uses less resources.

                    - Ant
                    - Some of my best work - Fish Dinner

      It sounded to me like he was going to be selecting them all anyway so I don't really see a performance advantage. And the only resources that are being used here is a single value to store the email address. I don't see a lick of difference in whether it's done in the script or not.

      You would definitely want to use the database resources for more sophisticated data retrieval. But this could be accomplished by just a flat file. Unless there's more to the script than just reading out these addresses, i'd actually go with a flat file instead.

        He wants to view 30 at a time... when he says very large page I assume cgi... but granted, if it is going to be a system script the only thing you would save in doing multiple selects with LIMIT would be memory, and chances are it would be better to select it all... if it is a cgi, using LIMIT is probably best.

                        - Ant
                        - Some of my best work - Fish Dinner

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found