<pedrocorreia.net ⁄>
 

<32 Tips To Speed Up Your MySQL Queries ⁄ >




clicks: 2985 2985 2009-02-04 2009-02-04 goto misc myNews misc  Bookmark This Bookmark This


If you are interested in how to create fast MySQL queries, this article is for you

1. Use persistent connections to the database to avoid connection overhead.

2. Check all tables have PRIMARY KEYs on columns with high cardinality (many rows match the key value). Well,`gender` column has low cardinality (selectivity), unique user id column has high one and is a good candidate to become a primary key.

3. All references between different tables should usually be done with indices (which also means they must have identical data types so that joins based on the corresponding columns will be faster). Also check that fields that you often need to search in (appear frequently in WHERE, ORDER BY or GROUP BY clauses) have indices, but don't add too many: the worst thing you can do is to add an index on every column of a table (I haven't seen a table with more than 5 indices for a table, even 20-30 columns big). If you never refer to a column in comparisons, there's no need to index it.

4. Using simpler permissions when you issue GRANT statements enables MySQL to reduce permission-checking overhead when clients execute statements.

5. Use less RAM per row by declaring columns only as large as they need to be to hold the values stored in them.



este é só um excerto do artigo, para aceder ao artigo completo, clique no link em baixo:
this is just a small excerpt from the article, to access the full article please click in the link below:

http://www.ajaxline.com/32-tips-to-speed-up-your-mysql-queries




Subscribe News RSS  Subscribe News Updates by E-mail





myNews <myNews show="rand" cat="misc" ⁄>

Adobe Photoshop CS6: Improvements for Web and UI Designers new ...

Photoshop CS6 has been hailed as a huge improvement for web and UI designers. I'm going to share wit (...)

clicks: 15547 15547 2012-05-14 2012-05-14 goto url (new window) webdesign.tutsp... goto myNews misc


Camera Exposure Modes Explained new ...

If you're just getting started with photography, the letters on your camera's dial might feel like h (...)

clicks: 13544 13544 2012-05-13 2012-05-13 goto url (new window) photo.tutsplus.... goto myNews misc


45 Fresh Collection of High Quality Free PSD Files new ...

What else can be so great for a designer than finding out high quality Photoshop PSD files? This is (...)

clicks: 8229 8229 2012-05-09 2012-05-09 goto url (new window) smashingapps.co... goto myNews misc


15 Free High Quality ToolTip PSD's new ...

A tooltip or infotip can be defined as a graphical hint that is incorporated with the website design (...)

clicks: 9817 9817 2012-05-07 2012-05-07 goto url (new window) smashingapps.co... goto myNews misc


40+ Elegant Examples of River Photography

River photography is one of the beautiful type of photography, photographers take pleasure in this w (...)

clicks: 5796 5796 2012-05-04 2012-05-04 goto url (new window) smashingbuzz.co... goto myNews misc


40 Fresh And High Quality Free Icon Sets In PSD Format

Here is yet another exciting collection of high quality Free Icon PSD files for the designers that t (...)

clicks: 6498 6498 2012-02-19 2012-02-19 goto url (new window) smashingapps.co... goto myNews misc


15 jQuery Calendar Date Picker Plugins

In this collection, you will see some of the best jQuery Calendar Date Picker Plugins that will allo (...)

clicks: 6404 6404 2012-02-18 2012-02-18 goto url (new window) smashingapps.co... goto myNews misc


50 Beautiful Yet Free HTML5 And CSS3 Templates

HTML5 templates are getting very popular these days because all professional HTML5 templates are com (...)

clicks: 6912 6912 2012-02-17 2012-02-17 goto url (new window) smashingapps.co... goto myNews misc