469,591 Members | 2,068 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,591 developers. It's quick & easy.

MySQL Indexing general question

I'm a bit confused about indexing using MySQL. I have something like
this:

Table:
PEOPLE

Values:
user_id
first_name
last_name
email

I put an index on user_id to speed up my search for:
select first_name, last_name, email from PEOPLE where user_id=xxx;

The question I have is:
Once I set up the index, does it only hold true for the data that was
currently in the table at the time the index was created? In other
words, if I add 100 more users tomorrow, will I have to rebuild the
index on user_id, or does MySQL automatically adjust for that?

Nino
Jul 19 '05 #1
4 3439
BDR
Yes, Mysql will automatically compensate for additions, entry
modifications and deletions using this type of index. You shouldn't
have to do anything.

Nino Skilj wrote:
I'm a bit confused about indexing using MySQL. I have something like
this:

Table:
PEOPLE

Values:
user_id
first_name
last_name
email

I put an index on user_id to speed up my search for:
select first_name, last_name, email from PEOPLE where user_id=xxx;

The question I have is:
Once I set up the index, does it only hold true for the data that was
currently in the table at the time the index was created? In other
words, if I add 100 more users tomorrow, will I have to rebuild the
index on user_id, or does MySQL automatically adjust for that?

Nino


Jul 19 '05 #2
BDR
Yes, Mysql will automatically compensate for additions, entry
modifications and deletions using this type of index. You shouldn't
have to do anything.

Nino Skilj wrote:
I'm a bit confused about indexing using MySQL. I have something like
this:

Table:
PEOPLE

Values:
user_id
first_name
last_name
email

I put an index on user_id to speed up my search for:
select first_name, last_name, email from PEOPLE where user_id=xxx;

The question I have is:
Once I set up the index, does it only hold true for the data that was
currently in the table at the time the index was created? In other
words, if I add 100 more users tomorrow, will I have to rebuild the
index on user_id, or does MySQL automatically adjust for that?

Nino


Jul 19 '05 #3
Thank you so much!

Nino

BDR <jo*@noemail.com> wrote in message news:<3F**************@noemail.com>...
Yes, Mysql will automatically compensate for additions, entry
modifications and deletions using this type of index. You shouldn't
have to do anything.

Nino Skilj wrote:
I'm a bit confused about indexing using MySQL. I have something like
this:

Table:
PEOPLE

Values:
user_id
first_name
last_name
email

I put an index on user_id to speed up my search for:
select first_name, last_name, email from PEOPLE where user_id=xxx;

The question I have is:
Once I set up the index, does it only hold true for the data that was
currently in the table at the time the index was created? In other
words, if I add 100 more users tomorrow, will I have to rebuild the
index on user_id, or does MySQL automatically adjust for that?

Nino

Jul 19 '05 #4
Thank you so much!

Nino

BDR <jo*@noemail.com> wrote in message news:<3F**************@noemail.com>...
Yes, Mysql will automatically compensate for additions, entry
modifications and deletions using this type of index. You shouldn't
have to do anything.

Nino Skilj wrote:
I'm a bit confused about indexing using MySQL. I have something like
this:

Table:
PEOPLE

Values:
user_id
first_name
last_name
email

I put an index on user_id to speed up my search for:
select first_name, last_name, email from PEOPLE where user_id=xxx;

The question I have is:
Once I set up the index, does it only hold true for the data that was
currently in the table at the time the index was created? In other
words, if I add 100 more users tomorrow, will I have to rebuild the
index on user_id, or does MySQL automatically adjust for that?

Nino

Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Börni | last post: by
3 posts views Thread by stan k. | last post: by
2 posts views Thread by Craig Stadler | last post: by
108 posts views Thread by Bryan Olson | last post: by
4 posts views Thread by Vic Cekvenich | last post: by
12 posts views Thread by howa | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.