Unix Technical Forum

Re: creating indexes on a table already containing data

This is a discussion on Re: creating indexes on a table already containing data within the MySQL General forum forums, part of the MySQL category; --> In the last episode (Oct 03), Angelo Zanetti said: > I've got a database that has a few thousand ...


Go Back   Unix Technical Forum > Database Server Software > MySQL > MySQL General forum

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 09:25 PM
Dan Nelson
 
Posts: n/a
Default Re: creating indexes on a table already containing data

In the last episode (Oct 03), Angelo Zanetti said:
> I've got a database that has a few thousand rows, I've noticed that
> some of the search queries (especially the large ones) are taking
> some time. Im looking at adding indexes to my tables in order to
> speed up the data retrieval.
>
> My question is as follows: At this point in time if I add the indexes
> to the various tables should I see immediate results in the query
> times or do I have to wait for new information to enter the database
> (only new data gets indexed?)
>
> When does the data actually get indexed? Is it when its inserted or
> continually when regards are inserted or updated in the database?


When you add an index, Mysql builds a complete index of your table
immediately. For a few thousand rows it should take under a minute.
The index will automatically be updated as you insert rows or change
existing ones.

--
Dan Nelson
dnelson@allantgroup.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com