Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    417

    mySQL working principal?

    i'm familiar with perl and now i want to switch to php+mySQL coz i've heard the way mySQL reading/writing data is very fast even with a 100M+ DB.

    but i doubt if i wish to query some data in a 100M+ DB, does mySQL read the WHOLE DB or just the range specified by me?

    i already have similar approach for a 100M size 1,000,000+ rows and 20 columns flat text DB, i have length of every row and column specified, i use seek() for filehandle instead of reading the whole file for every query, so far the performance isn't so impressed

    thanks

  2. #2
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    I've got a 2.2 Gb MySQL database and it's pretty fast at simple select, updates and inserts.

    Running global searches isn't that slow either if you have your indexing right.

    It can easily handle around 5 million records in a single table.

    Just don't try to retrieve all 5 million in one go, put conditions in your select statement.

    A 100+Mb database is nothing for MySQL to handle, should do so easily.

  3. #3
    Join Date
    Mar 2004
    Location
    Poland, Lublin
    Posts
    71
    the key to success is good mysql configuration..

  4. #4
    Join Date
    Jan 2003
    Posts
    1,715

    Re: mySQL working principal?

    Originally posted by lwknet i already have similar approach for a 100M size 1,000,000+ rows and 20 columns flat text DB, i have length of every row and column specified, i use seek() for filehandle instead of reading the whole file for every query, so far the performance isn't so impressed[/B]
    Ahh... but how do you have the length list specified? Another list?

    When you work with large datasets, indexing data becomes crucial for performance. The database servers (MySQL among them) provide an easy way to index multiple columns and cross-reference data. You could do it on your own, if you've taken a nice data structures class, but that's really a waste when it's already gift-wrapped for you.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

  5. #5
    Join Date
    Aug 2002
    Location
    Hong Kong
    Posts
    417

    Re: Re: mySQL working principal?

    Originally posted by hiryuu
    Ahh... but how do you have the length list specified? Another list?

    When you work with large datasets, indexing data becomes crucial for performance. The database servers (MySQL among them) provide an easy way to index multiple columns and cross-reference data. You could do it on your own, if you've taken a nice data structures class, but that's really a waste when it's already gift-wrapped for you.
    your right, i don't need to do it myself, just for fun.

    sorry but i believe if you want to only "touch" a specific range of data you need to supply the corresponding "location" in bytes as its the nature of how harddrives work, any "symbol" specific read method isn't truely "untouching" the unwanted data. say if you want to tell the OS to start looking for data from "\n", then it will try to read all the data until it sees the "\n", then it can continue wit the remaining processes, and this kind of I/O waste will repeat itself...

    in this approach i need to create a small key file to specify the bytes length of each coloumn or make the key to appear in the first row of the file, its only useful if the DB is to store data in a predictable structure, say each record is 10-50 bytes in length, but i just thought of an idea to push the remaining bytes of data exceeding the 50 bytes limit to the next row starting in the same column & it can be repeated, no joking but i believe some "old" DB software out there stores data this way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •