MySql optimization for large tables - memory requirements

Posted on 2006-05-25
Last Modified: 2008-02-01
I have mySQL and PHP running on a single dedicated server hosting a web application and will have aprox 10 - 30 concurrent connections.  The database contains a person table with 12 million records (2GB) and an address table with 8 million records (1.5GB).  The entire database including the other tables will be about 5 - 6 GB.  I am currently running a default installation of XAMPP and have not optimized any memery setting in mySQL.  The server has 1.5GB installed.  I know I am not giving enough information for a specific answer, but are there any obvious issues or bottlenecks limiting performance?  Is 1.5GB way to small for this database?  Most queries are optimized to use indexes but occasionally someone will run something that is not optimized and seems to bring things to a halt.
Question by:doughoman
    LVL 29

    Accepted Solution

    No idea on the hardware side of your question.
    Just looking at "occasionally someone will run something that is not optimized and seems to bring things to a halt". Have you some info on these non-optimized queries? You might look more closely to them, in case some of them might benefit from an additional index.

    You did not mention if your base is just running SELECTs or if you have a significant INSERT or UPDATE activity.
    If mainly SELECTs, you may check (eg, using stats from phpMyAdmin) if some of your could be "optimized", ie records physically reorganized so that they would match the "natural order" of ONE of the indexes, the one you would select when doing this optimization.
    LVL 22

    Assisted Solution

    It's always possible for a database user to issue a poorly-designed (or malicious) query that will bring your server to its knees.  If you can't trust someone to be responsible, then you need to force them to work through an api, use stored procedures, or set up a replication slave server that they can bog down to their heart's content.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
    I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
    This video discusses moving either the default database or any database to a new volume.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now