Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I agree with TheoPeterson's points, and I will add on to warn that there are more important things than speed:

  • MySQL (or other relational databases) usually hold up better when you start increasing the number of records in your tables. Flat files with 1000s of records starts to become very very slow. MySQL can hold up quite well even when you get into 5 digits+. (There have been projects where I've used text files thinking that there'd only be a couple hundred records. Several years later, let's just say that the client exceeded my expectations.)

  • MySQL is a lot easier to work with when your tables need to mutate. If your client decides that they want to add/drop fields, then it's easier to do using a few ALTER statements, rather than hacking scripts together to manually rearrange your database tables. It's better during the development process as well.
  • With flat files you have to be a lot more careful about file locking and data integrity. That's not as much of a concern with most RDBMs.

  • With flat files you have to be a lot more careful about security. With MySQL, etc., you have a lot of flexibility, and can assign access privledges to each action (SELECT,INSERT,DELETE,etc.).

...and so on. I know that you weren't using your benchmarks to start a war about MySQL vs flat files, but you did mention that you were looking for the "best way". In my humble opinion, the fastest way isn't the best way in this case. For a lot of projects, messing with flat files or CSVs are just too much of a headache.

It is good to see the benchmarks though. Thanks for taking the initiative!


In reply to Re: Mysql, CSV, and flatfiles, a benchmark. by koolade
in thread Mysql, CSV, and flatfiles, a benchmark. by illitrit

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-24 04:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found