ORDER BY causing disk space error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • empiresolutions
    New Member
    • Apr 2006
    • 162

    ORDER BY causing disk space error

    The following query is causing a mysql error The Error number is 28, which means low disk space. So I clear some space, retry and get the error again after a few times querying. After playing with query i find that the ORDER BY statement is what make it fail. If i remove it the script runs.

    So my question is, is there something about an ORDER BY statement that takes up a lot of disk space? I can sort in PHP, but if MySQL has the ability then i prefer it to sort with.

    Thanks for all the suggestions.

    [code=mysql]SELECT data.datasize AS size, data.dataid AS id, data.datatype, data.dataname, data.datadescri ption AS description, data.engineerid AS owner, datalog.usabili ty AS usability,datal og.easeofdownlo ad AS easeofdownload, datalog.docaccu racy AS accuracy, datalog.timesdo wnloaded AS timesd, datalog.ratings AS ratings from data, datalog where data.datatype = 'AE Training video' AND data.dataid = datalog.dataid ORDER BY data.dataname[/code]
    Last edited by mwasif; Mar 5 '08, 03:24 PM. Reason: Added [code=mysql]/[/code] tags
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    You can prefix your statement with EXPLAIN so you can check whether MySQL can use indexes to resolve the query. It cannot if you see Using filesort in the Extra column.

    Do you have an index on data.dataname ? If not, try that.

    Ronald

    Comment

    Working...