sql - Why is my MySQL query hanging when doing an ORDER BY with a LIMIT of over 250? -


here query. works fast. have index on movies.movieid, movie.title, collectors_collections.barcode, , collectors_collections.username (as indexes on other tables):

select * collectors_collections join movieitemdetails on collectors_collections.barcode = movieitemdetails.barcode join movies on movieitemdetails.movieid = movies.movieid join barcodes on collectors_collections.barcode = barcodes.barcode (wishlist = 'no' or wishlist null) , barcodes.type = 'movie' , username = 'ethanwa' order movies.title limit 250 

as change limit this:

order movies.title limit 251 

i constant hang in query can't recover unless kill it. causing , how can fix it? there setting missing? index? corrupt?

figured out hanging being caused not allocating enough memory mysql, causing of tables sent disk, made take forever. increase of memory amounts in mysql settings solved issue.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -