If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > ORDER BY causing disk space error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-04-08, 14:10
cesarcesar cesarcesar is offline
Registered User
 
Join Date: Mar 2008
Posts: 55
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.

Quote:
SELECT data.datasize AS size, data.dataid AS id, data.datatype, data.dataname, data.datadescription AS description, data.engineerid AS owner, datalog.usability AS usability,datalog.easeofdownload AS easeofdownload, datalog.docaccuracy AS accuracy, datalog.timesdownloaded AS timesd, datalog.ratings AS ratings from data, datalog where data.datatype = 'AE Training video' AND data.dataid = datalog.dataid ORDER BY data.dataname
Reply With Quote
  #2 (permalink)  
Old 03-04-08, 14:15
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
how many rows are in each table?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-04-08, 14:19
cesarcesar cesarcesar is offline
Registered User
 
Join Date: Mar 2008
Posts: 55
db is very small at 67k.
Reply With Quote
  #4 (permalink)  
Old 03-05-08, 20:08
CyberEveryday.com CyberEveryday.com is offline
Registered User
 
Join Date: Mar 2008
Posts: 6
Not sure if this will help, but did you try creating an index on the column(s) you are ordering on?
Reply With Quote
  #5 (permalink)  
Old 03-07-08, 22:20
xtremenw xtremenw is offline
Registered User
 
Join Date: Mar 2008
Location: Tacoma, WA
Posts: 11
Quote:
Originally Posted by CyberEveryday.com
Not sure if this will help, but did you try creating an index on the column(s) you are ordering on?
That will help because otherwise it has to do a full table scan.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On