Re: Adding an index to a table
James Riordon wrote: At 15:07 +0800 03/28/2002, Sammy Lau was thought to have said : ?http://www.mysql.com/doc/C/R/CREATE_INDEX.html Granted, I should have looked before I spoke for the first question. 2 - Do I have to do anything special like stop requests to the server while I add the index. 3 - How safe is this to do? I do not see the answer for #2 and #3 in the recommended reading. Can anyone comment on those questions, or should I just backup and dive on in? You do not need to stop requests while building the index. However, the table will be locked while the index is being created so you may not want to do it during a high traffic period. The time it takes to build the index depends upon how many rows are in the table and whether or not the index is unique (unique indexes will take longer to build). It's safe to do. The worst thing that could happen is that you kill your mysql server mid-index create and then you will need to do a recover table when you bring it up but no data will be lost due to the in-process index create. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Adding an index to a table
At 15:07 +0800 03/28/2002, Sammy Lau was thought to have said : ?http://www.mysql.com/doc/C/R/CREATE_INDEX.html Granted, I should have looked before I spoke for the first question. 2 - Do I have to do anything special like stop requests to the server while I add the index. 3 - How safe is this to do? I do not see the answer for #2 and #3 in the recommended reading. Can anyone comment on those questions, or should I just backup and dive on in? Many thanks. James - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Adding an index to a table
Hi, I have a MySQL database that currently is used by about 8000 users. I need to add an index to one of the fields in one of the tables to help speed up a particular query being made to the MySQL database. I am a bit nervous to do so in case I screw up. Mind you I have backed up the databases all ready. 1 - What command do I issue to add a simple index to one field in a table. 2 - Do I have to do anything special like stop requests to the server while I add the index. 3 - How safe is this to do? Many thanks. James - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Adding an index to a table
http://www.mysql.com/doc/C/R/CREATE_INDEX.html 1 - What command do I issue to add a simple index to one field in a table. 2 - Do I have to do anything special like stop requests to the server while I add the index. 3 - How safe is this to do? Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) -- Sammy Lau mailto: [EMAIL PROTECTED] - Tell me what you want and I'll tell you how you can live without it. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php