Nov 212012
 

1. Editer le fichier my.ini

2. Augmenter la taille du buffer mémoire (attention à ne pas dépasser 80% de la mémoire disponible)

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
#innodb_buffer_pool_size=47M
innodb_buffer_pool_size=512M

Résultat pour la même requète :

Avant

12:43:19 SELECT co.Name,  (SELECT MAX(ci.Population)   FROM city_huge ci  WHERE ci.CountryCode = co.Code) FROM country_huge co 
239 row(s) returned 354.297 sec / 0.000 sec

Aprés

12:52:00 SELECT co.Name,  (SELECT MAX(ci.Population)   FROM city_huge ci  WHERE ci.CountryCode = co.Code) FROM country_huge co 
239 row(s) returned 4.516 sec / 0.000 sec
VN:F [1.9.22_1171]
Cette astuce est pratique ? laissez un vote ;)
Rating: 10.0/10 (1 vote cast)