4 ms·
MySQL had some historic issues with schema changes -- adding a column to a table with a few million records could take hours. While it does have a lot of work t
by huggyface 15y ago
MySQL had some historic issues with schema changes -- adding a column to a table with a few million records could take hours. While it does have a lot of work to do -- it is restructuring every page of the database -- in competitive products such a change takes a minute fraction of the time (limited only by IO performance).
- jcromartie 15y agoI see. That makes much more sense. Yes, I suppose I'm used to DB servers that are more nimble in that department.
- gizzlon 15y agoBut altering a table would still block it? And possible even other tables as well? And take a long time? Only ever done this in MySQL, where you really can't alter big, live, tables. Well, facebook made an utility for it: http://www.facebook.com/notes/mysql-at-facebook/online-schema-change-for-mysql/430801045932 http://www.facebook.com/notes/mysql-at-facebook/online-schem...
- jeltz 15y agoMost changes would still block, yes, but at least in PostgreSQL many changes will only block a short time (since they do not require a full table rewrite, only altering the table descirption) and in my experience rewriting a table is generally quick for a decent sized database (tables with a handful of millions of rows).