473,404 Members | 2,137 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,404 software developers and data experts.

Basic mySQL Indexing question

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 INTO) command.

Question is, do I have to reindex, and when and how often?
Does mySQL automatically build indexes on the fly as I add data?

If I do have to reindex, is there a command that will rebuild all the
indexes for that table (I have 4) ???

Thanks for ANY clarification.
Craig
cs********@hotmail.com
Jul 20 '05 #1
2 1594
Craig Stadler wrote:
Question is, do I have to reindex, and when and how often?
Does mySQL automatically build indexes on the fly as I add data?
It should merge the new state of the table into the index as you add
data, but this is not the speediest process, and it might not result in
a well-balanced index.
If I do have to reindex, is there a command that will rebuild all the
indexes for that table (I have 4) ???


Yes, myisamchk can be used to do this. I think this page will help you:
http://dev.mysql.com/doc/mysql/en/Insert_speed.html

Regards,
Bill K.
Jul 20 '05 #2
"Craig Stadler" wrote:
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 INTO) command.

Question is, do I have to reindex, and when and how often?
Does mySQL automatically build indexes on the fly as I add data?

If I do have to reindex, is there a command that will rebuild all the indexes for that table (I have 4) ???

Thanks for ANY clarification.
Craig
cs********@hotmail.com


From the functionality standpoint, everything will work, and you don’t
have to do anything special for the indexes to be populated.

From the performance standpoint, if it is an issue, use delay key
write to defer writing the indecis to disk (a huge perfor. drain).

--
http://www.dbForumz.com/ This article was posted by author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbForumz.com/mySQL-Basic-...ict140718.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=472904
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bacci | last post by:
I have two tables. The first is "Locations" which has 52,000 zip codes w/cooresponding latitudes and longitudes. The second "Suppliers" has 2,000 company names and addresses. The user enters a...
0
by: Phil Powell | last post by:
The table already has a fulltext index and from there I can use the MySQL fulltext search query to get results as well as the relevancy score. The problem I have is that MySQL has a default...
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:...
0
by: James Walters | last post by:
Hello, DB novice checking in here with a basic design question. I have a table called 'nms_apps' which stores information about all of our applications which we have developed/maintained for...
4
by: Nino Skilj | last post by:
I'm a bit confused about indexing using MySQL. I have something like this: Table: PEOPLE Values: user_id first_name last_name
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...
3
by: nick | last post by:
Hi, I'm pretty much a database beginner and have what I think is a basic question: If I have a table which has a 'status' column and I can have say three statuses: "active", "pending",...
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...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.