Tag Info

New answers tagged

1

Will the ALTER TABLE command that changes only COLLATION of a column and nothing else increment values of a TIMESTAMP column on SQL Server 2008 R2 Std.? No it wont change/incement the values of timestamp column. altering a collation is specific to that column only. From BOL : The value in the timestamp column is updated every time a row containing ...


3

This is likely due to previous alters (particularly of existing column widths) that are still reflected in the underlying page structure. Try rebuilding the table or dropping/re-creating the clustered index to reclaim that space. http://sqlblog.com/blogs/kalen_delaney/archive/2006/10/13/alter-table-will-not-reclaim-space.aspx


0

This is a question which gets asked regularly in some form or other here. Take a look at my reply to a similar one not so long ago. Basically, there are two main tools out there for this - either Percona's pt-online-schema-change (available here) or Shlomi Noach's oak-online-alter-table (from here). There are a couple of other possible solutions mentioned ...


0

Two things I learned here. Insert a record, and edit the last insert id. Alter table auto-increment, which will take sometime. It's better to just deal with the problem using #1


5

While Rolando has my vote, because he is right in your case, I want to answer your original question (for you in the future and for others) regarding percona toolkit: pt-table-sync is not what you want. Think about pt-online-schema-change. While there are some hard corners, it works on RDS with the right configuration or minimal changes on the script. ...


4

Look carefully at your question. You said you are using MEDIUMINT UNSIGNED. The range of MEDIUMINT SIGNED is -8,388,608 to 8,388,607 The range of MEDIUMINT UNSIGNED is 0 to 16,777,215 This is from the MySQL Documentation At present, you are not in danger of hitting the max value. UPDATE 2014-08-04 14:28 EDT If you are willing to schedule downtime and ...


2

Autoincrement values can only be numeric (integer and floats types if I remember correctly). If you want to store S1, ...., S1000, just store an integer, and return the extra S on select or on client side: create table tbl(ID bigint not null primary key auto_increment,name varchar(100)) auto_increment=1; insert into tbl (name) values ('a'); ... select ...



Top 50 recent answers are included