Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    464

    Unanswered: column taking too long to drop

    Hi

    I created a new 10g (10.2.0.5.0)db and am in the process of adding tables to it. In one particular table I added some columns by mistake and am now trying to drop them using:

    alter table drop column_name;

    but this is taking absolutely ages. I've tried this through Toad and SQLPLUS. I've been shut the db down and restarted it but no good.

    Can anyone please advise?

    Regards
    Shajju

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Is there any foreign key constraint that relates to that column? If so, try to disable (or drop) it first.

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    My guess is, that some other process is still using that table and therefor you cannot run DDL on it.
    I will not read nor answer questions where the SQL code is messy and not formatted properly using [code] tags: http://www.dbforums.com/misc.php?do=bbcode#code

    Tips for good questions:

    http://tkyte.blogspot.de/2005/06/how...questions.html
    http://wiki.postgresql.org/wiki/SlowQueryQuestions
    http://catb.org/esr/faqs/smart-questions.html

  4. #4
    Join Date
    Aug 2008
    Posts
    464
    Thanks for the replies guys. I couldn't figure out why but did read that dropping a column, the whole table is re-written. So I just set the columns in question 'unused'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •