We see same next-gallery problems as written above (WP 3.8 and Nextgen-gallery 2.0.40). This is related with problem written here.
This SQL query is in state “Copying to tmp table” about 300 seconds and locks other nextgen-gallery SQL queries.
SELECT wp_ngg_pictures . * , wp_options
.option_value
AS ‘custom_post_id’, GROUP_CONCAT( CONCAT_WS( ‘@@’, meta_key, meta_value ) ) AS ‘extras’
FROM wp_ngg_pictures
LEFT OUTER JOIN wp_options
ON wp_options
.option_name = CONCAT( ‘wp_ngg_pictures_’, wp_ngg_pictures.pid )
LEFT OUTER JOIN wp_postmeta
ON wp_postmeta
.post_id
= wp_options
.option_value
WHERE (
exclude
=0
)
GROUP BY wp_ngg_pictures.pid
ORDER BY rand( )
LIMIT 10
There are more than 2000 (!) “displayed_gallery_rendering….” rows and more than 1200 (!) “_transient_…” keys with “nextgen” value in wp_options table.