Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8612517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:38:48+00:00 2026-06-12T04:38:48+00:00

I have build a system using PHP-MySQL. This system is subject to a very

  • 0

I have build a system using PHP-MySQL. This system is subject to a very heavy load, with thousands of selects,updates,inserts,deletes every minute.

I would like to optimize this system, to make it faster, and reduce load on the servers.
I have already introduced memcache, but mysql data is still needed.

So my question is, which method would be the best in this case.
Currently my queries would look like this:

$q = mysql_query($sql);
while(mysql_fetch_array($q)) {...

I have read that there is a little speed to gain by using mysql_fetch_assoc (?)

But perhaps there is an antirely different approach, when i start optimizing this system?

Thank you all – (Apologies for my limited english skills)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:38:49+00:00Added an answer on June 12, 2026 at 4:38 am

    mysql_fetch_assoc vs mysql_fetch_array will duplicate less data thus use less memory. Since the data is presented associative and by index in the array, with that you will get some tiny optimization although will help if your dataset is big.

    • Try to use natural sort (AKA avoid SORT in query sentences) and LIMIT your result set if you can
    • Batch queries: instead run 100 inserts over the same table try to do a few of them small.
    • cache cache cache if you can: using redis or memcached.
    • if you generate pages that can be treated as static try to use HTTP headers to avoid browsers to request your site all the time
    • etc. etc.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple chat system I've built using PHP and MySQL (this
Using PHP and MySQL, I have a forum system I'm trying to build. What
I want to build a chat system in nodeJs + MYSQL using php. It
I am planning to build a University Management System using PHP/MYSQL. Should I get
I have a web application that needs to be built using PHP/MySQL. The application
We have a jquery/php/mysql system that allows a user to log in and review
I am working on a system using php/mysql where I am allowing users to
I'm looking for a eCommerce system built using PHP and MySQL. It needs to:
For a personal project, I need to build a forum using PHP and MySQL.
I have a very simple web synchronization PHP I want to build which basically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.