Title: Too long sql request on web hosting server
Last modified: August 21, 2016

---

# Too long sql request on web hosting server

 *  Resolved [Lolive69](https://wordpress.org/support/users/lolive69/)
 * (@lolive69)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/too-long-sql-request-on-web-hosting-server/)
 * Hello NGG users & staff
 * I’ve received few days ago a mail from my shared web hosting (Infomaniak)
 * > It seems that certain requests SQL of your xxxxx.com site are not sufficiently
   > optimized and involve an overconsumption of resources on the MySQL servers.
   > 
   > In occurrence, the server indicates a 830 seconds total for only 130 requests.
   > Time execution seems too important – it misses one or more index on the tables
   > used in the request – the request is badly written and examines an incoherent
   > number of lines – the type of the fields used in the tables are inappropriate(
   > varchar instead of int, etc) – etc
   > here is the bad request log
   >     ```
   >     # Time: 140302 20:48:22
   >     # User@Host: xxx13[xxxx] @ imu249.infomaniak.ch [xx.xx.xxx.254]
   >     # Query_time: 54  Lock_time: 0  Rows_sent: 1  Rows_examined: 3316754
   >     use xxx13com;
   >     SELECT wp_ngg_pictures.* , <code>wp_options</code>.<code>option_value</code> AS 'custom_post_id', GROUP_CONCAT(CONCAT_WS('@@', meta_key, meta_value)) AS 'extras' FROM <code>wp_ngg_pictures</code> LEFT OUTER JOIN <code>wp_options</code> ON <code>wp_options</code>.option_name = CONCAT('wp_ngg_pictures_', wp_ngg_pictures.pid) LEFT OUTER JOIN <code>wp_postmeta</code> ON <code>wp_postmeta</code>.<code>post_id</code> = <code>wp_options</code>.<code>option_value</code>  GROUP BY wp_ngg_pictures.pid LIMIT 1
   >     ```
   > 
 * **i’m using**
    WP 3.8.1 french ngg 2.0.40 **hosting** Mysql 5.0 PHP 5.4.x/PHP5.3.
   x/PHP 5.2.x CGI Serveurs Apache 64 bits Streaming Audio / Vidéo Javascript Liaison
   SSL 128 bits Perlmagic via Imagemagick 6.3.9 Zend Optimizer Perl Python WAP Ready
 * this bad thing appears suddenly after many weeks of using ngg 2.0.40 without 
   any problem.
    Any solution ? Thanks in advance
 * Olivier
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/too-long-sql-request-on-web-hosting-server/#post-4669549)
 * [@lolive69](https://wordpress.org/support/users/lolive69/) – Please update to
   our latest beta version, this will hopefully sort out the issues you are seeing
   with the database. Please see this page for more details: [http://www.nextgen-gallery.com/nextgen-gallery-latest-beta/](http://www.nextgen-gallery.com/nextgen-gallery-latest-beta/)
 * Thanks!
 * – Cais.
 *  Thread Starter [Lolive69](https://wordpress.org/support/users/lolive69/)
 * (@lolive69)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/too-long-sql-request-on-web-hosting-server/#post-4669620)
 * OK Cais
    merci beaucoup

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Too long sql request on web hosting server’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Lolive69](https://wordpress.org/support/users/lolive69/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/too-long-sql-request-on-web-hosting-server/#post-4669620)
 * Status: resolved