Add an index to a large table

Adding an index to a large table can cause problems if the table is heavily used. It may take a very long time and may even fail. The solution is quite simple. Create a new table based on the old table and add the index to the new table. Then copy all the data like this: If the table is […]