Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

One table of our database has large amount of data. It has about 20 million records. We need to add 2 new columns into this table.

We have 15 GB space on the drive.

When we start the process to add new fields, this process eats all the memory and finally gives us the "Low Disk Space" error message.

How can this be solved?

share|improve this question

migrated from stackoverflow.com Oct 31 '11 at 8:45

This question came from our site for professional and enthusiast programmers.

5  
You're likely to find few takers for your questions as your reputation on SO is very poor. You've asked 11 questions in the past 4 months, accepted 0 answers and very rarely responded to follow-up questions. People here are willing to help, but using history to predict the future, they'd just be wasting their time. –  magicmike Oct 31 '11 at 0:35
add comment

2 Answers 2

My assumption is that you actually have too little space available. 20 million rows getting two new columns can result in 20G of data if each column is 512 byte per record.

There's also the possibility that there's an index creation involved in this process - which also takes up its amount of space.

What kind of datatype are the columns?

share|improve this answer
add comment

Are you putting the columns at the end of the table or in the middle? Are you setting a default value with the columns being defined as not null or putting NULL values in there?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.