SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict WebMasterAJ's Avatar
    Join Date
    Aug 2000
    Location
    Miami
    Posts
    335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trying to optimize my site

    Hello one and all...

    I'm trying to optimize my site's main page... there are quite a few database queries for different functions. I really don't know that much about optimization, so hopefully my question isn't that dumb... LOL..

    Anyway, if I took the database query and asked it to query the same data and then STORE that data in TXT file. Then, use PHP to include that text file.

    Basically, when someone accesses the page it makes a query to the database to grab that information and then put it on the page. Would it be faster if it would instead grab a txt file?

    Thank you for your time and energy!

    Sincerely,
    Andrew Tatum

    PS: Sorry if this is the wrong forum, please move if neccessary.
    Andrew Tatum
    FinHeaven & Co - Get Drenched With Finformation
    The FinHeaven & Co Forums

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2004
    Location
    France
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by WebMasterAJ
    Anyway, if I took the database query and asked it to query the same data and then STORE that data in TXT file. Then, use PHP to include that text file.
    Yes it would, but then you'll have to manage that text file to make sure it's "reasonably" up to date. You can also get a bit more speed by caching the query results in shared memory (a bit more complex to set up though)

  3. #3
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd stick with the database. If you store large files (like binary/images), then save the files onto harddrive, the DB should only have the path to these files. But for smalll include files, managing/keeping them in sync doesn't worth the effort and you won't gain any performance. MySQL 4.x supports query caching with just a simple modification to my.cnf.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy


Bookmarks

Posting Permissions

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