Re:The lack of proper “alter table” support in SQLite
by gaadd33 on Saturday June 15, 2013 @10:00PM
(#5887104)
Why is ALTER never useful in production?
[ Parent
| on HN ]
Re:The lack of proper “alter table” support in SQLite
by mateo411 on Saturday June 15, 2013 @10:54PM
(#5887243)
I wouldn't say that ALTER TABLE is never useful in production, but you should try to avoid it, especially if you have large tables. Many implementations of ALTER TABLE, lock the table, which means that no process can write to the table, until the ALTER TABLE command completes. If the ALTER TABLE statement takes minutes, or a few hours to complete, then you will have degraded performance or downtime.
Re:The lack of proper “alter table” support in SQLite
by gaadd33 on Saturday June 15, 2013 @11:18PM
(#5887283)
Oh yeah that's very true, many SQL engines seem to lock tables whenever a DDL statement is run. I do like that Postgresql tends not to, it is a huge change from the hoops you have to jump through to add columns in a production MySQL scenario.