Jump to content

how to improve SQL loading speed?


Recommended Posts

my current setting

 

have query cache              - YES
query cache limit                - 64 MiB
query cache min res unit    - 4,096
query cache size                - 256 MiB
query cache type               - ON
query cache wlock invalidate - OFF
Edited by cutecat (see edit history)
Link to comment
Share on other sites

It's not as easy as it seems. Here is a part of discussion from stackoverflow with little explanation:

 

 

EXPLAIN is your friend. Other than that, you must rely on a mixture of ad-hoc tools, testing, and the OS tools to see exactly what's going on.

A lot of things can be seen effectively either from the OS tools (good for determing whether a situation is CPU or IO bound) or the various variables which can be seen in MySQL itself (show global variables, show engine innodb status etc).

I feel that it's really important to have a PERFORMANCE TEST ENVIRONMENT. Get a production-sized database with production-like load (using load simulation) running on production-grade hardware in your lab (expensive but essential).

Once you've done that you can tweak any parameters you want in complete safety, knowing that even if it melts the whole server you can just rebuild it without affecting anything.

Don't do specific things that people suggest unless you've tested them in your performance test environment and found them to be provably beneficial.

Essentially, performance tuning usually looks at three areas, in this order:

  • Structure of your database itself (table structure, indexes etc)
  • Queries
  • Tuning the server parameters

The first two are often overlooked in favour of the last one, which can help but only after the first two are done.

Don't underestimate the importance of reducing the amount of work the server needs to do - using smaller fields, fewer rows, fewer columns etc, is always better.

 

source: http://stackoverflow.com/questions/362223/best-mysql-performance-tuning-tool

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...