Quick question:
Does SQL do table/schema changes "in place"?
I've got a large table (140+ million rows of very wide
data) that we want to change the schema on -- basically
to remove a number of the unused data elements that we
don't use.
Anyway, does anyone know if SQL will do an in-place
change, or if it will copy the table to a new table, thereby
increasing my space allocation needs? I'd effectively,
temporarily, need space for two tables while the change
is happening if it copies the table first. This is not good as
I do not have enough available space at the moment.
If you've got pointers to specific MS docs regarding
this issue, please let me have 'em.
Thanks in advance. 2 3713
"Sgt. Sausage" <no****@nowhere .com> wrote in message
news:40******** *************** @nnrp.fuse.net. .. Quick question:
Does SQL do table/schema changes "in place"?
It depends.
If you're adding a nullable column generally it'll do it in place.
If you're adding a non-nullable column generally it'll make a copy. I've got a large table (140+ million rows of very wide data) that we want to change the schema on -- basically to remove a number of the unused data elements that we don't use.
If you're dropping columns, I believe it will drop them in place. Anyway, does anyone know if SQL will do an in-place change, or if it will copy the table to a new table, thereby increasing my space allocation needs? I'd effectively, temporarily, need space for two tables while the change is happening if it copies the table first. This is not good as I do not have enough available space at the moment.
If you've got pointers to specific MS docs regarding this issue, please let me have 'em.
Thanks in advance.
"Sgt. Sausage" <no****@nowhere .com> wrote in message
news:40******** *************** @nnrp.fuse.net. .. Quick question:
Does SQL do table/schema changes "in place"?
I've got a large table (140+ million rows of very wide data) that we want to change the schema on -- basically to remove a number of the unused data elements that we don't use.
Anyway, does anyone know if SQL will do an in-place change, or if it will copy the table to a new table, thereby increasing my space allocation needs? I'd effectively, temporarily, need space for two tables while the change is happening if it copies the table first. This is not good as I do not have enough available space at the moment.
If you've got pointers to specific MS docs regarding this issue, please let me have 'em.
Thanks in advance.
You might want to check out this article by Kalen Delaney, which explains
ALTER TABLE in some detail: http://www.sqlmag.com/Articles/Index...rticleID=40538
Simon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John |
last post by:
I'm developing an application for medical use that will be used to
capture patient background and visit data. The application will have
approximately 50 forms, with an average of about 20 fields each-- so a
total of 1000+ fields. Almost always, the fields are unique to a
particular form--and it will be pretty unlikely that new forms and
fields will be added--although not out of the realm of possibility.
There will also be a search...
|
by: PR |
last post by:
Hi,
I have a basic question on schema changes performed on populated tables.
Should I prepare for big roll back area and so on for both of these changes:
ALTER TABLE ADD COLUMN
ALTER TABLE ALTER COLUMN
Table contain abt. 40 mill records
Appriciate the help, as i am just DBA stand in in my project:-)
|
by: Gordon Burditt |
last post by:
What's the easiest way to copy a row from one table to another
(with the same schema), without knowing in advance the number and
types of the columns?
The problem: I have several sets of tables with a primary key of
'account', which contains an email address. If someone changes
their email address, I need to change the 'account' field.
Unfortunately, someone thought it would speed up lookups if instead
of having one table 'settings',...
|
by: Alex |
last post by:
Hi,
is it possible to add a column to a table at a specific place ? Reading
the man pages i could not figure that out.
Thanks.
Alex
---------------------------(end of broadcast)---------------------------
|
by: Stewart Allen |
last post by:
Hi
Just asking for ideas on table design.
The design I have is as follows:
*tblBuildData*
BuildID (PK) AutoNumber
ManufactureDate
SerialNumber
| |
by: Serge Rielau |
last post by:
Hi all,
Following Ian's passionate postings on problems with ALTOBJ and the
alter table wizard in the control center I'll try to explain how to use
ALTOBJ with this thread. I'm not going to get into the GUI because it is
hard to describe in text.
First of all what is the purpose of ALTOBJ()?
This procedure was created mostly for ISVs who need to do produce change
scripts to upgrade application from release to release, but it can also
|
by: Giacomo |
last post by:
Hi,
I’ve the following error message:
---------------
ALTER TABLE .
ALTER COLUMN varchar(10)
Go
Server: messaggio 4929, livello 16, stato 1, riga 1
|
by: Frank Swarbrick |
last post by:
We have a batch process that inserts large numbers (100,000 - 1,000,000) of
records into a database each day. (DL/I database.) We're considering
converting it to a DB2 table. Currently we have logic in place that, prior
to inserting any data, reads the first input record and checks to see if it
already exists in the table. If the record already exists there are two
options:
1) Don't continue, because you already ran this job today!
2)...
|
by: eduardasm |
last post by:
Hello,
I have a problem with XML schema update for one XML column (problem
exists in both SP1 and SP2 for SQL Server 2005).
1. I have a table that looks like this:
CREATE TABLE .(
NOT NULL DEFAULT (newid()),
(500) NOT NULL,
NULL,
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |