I have a big table (500 000 000 rows) like
create table x
(
id int not null identity(1,1) primary key,
name nvarchar(MAX),
type int
)
The value id
is already near MAXINT
, that is why I need to change the type from INT
to BIGINT
.
This query works but takes very long
alter table [dbo].[x]
alter column id bigint;
What I can do to change the type faster?