473,385 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 3520
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Börni | last post by:
Hi, I have an sql query like this: SELECT column FROM table WHERE column1="3" AND column2="1" This query works perfectly if i run it in the command line, to be exactly it return two results. But...
3
by: stan k. | last post by:
First of all i'm on a win32 platform using java. I also have mysql installed. My question isabout benchmarks and multiple inserts & selects SQLITE: http://www.sqlite.org/ HSQL:...
2
by: Craig Stadler | last post by:
I have a fairly large database on my (2 million records) WIN32 mySQL 4.0.20 The question is: I am adding large amounts of data to it (300,000 to 500,000 at a time) with the standard (INSERT...
1
by: Danny | last post by:
sorry for posting a question that has probably been posted hundreds of times, but i can't seem to find the answer i need...We're using a Sql Server 7.0 database and recently started getting timeout...
108
by: Bryan Olson | last post by:
The Python slice type has one method 'indices', and reportedly: This method takes a single integer argument /length/ and computes information about the extended slice that the slice object would...
4
by: Vic Cekvenich | last post by:
What would be performance of pgSQL text search vs MySQL vs Lucene (flat file) for a 2 terabyte db? thanks for any comments. ..V -- Please post on Rich Internet Applications User Interface...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
4
by: Amar | last post by:
Hi All, I need to select data from a database table containing huge amount of data. Now I am storing data using one primary key and I am just using simple select statement, and this process...
12
by: howa | last post by:
any side effect for PHP? what do you think?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.