469,090 Members | 1,196 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

INDEX'd fields...any drawbacks?

I have a database, about 12 fields per record and roughly 100,000
records per month.

I would do the following query:

select count(*), type from TABLENAME where field0='23-23-23' group by
the query would run an average of about 2secs. Not bad until I am
running the same query about 1400 times all with slightly different
field0 values.

I added an index for field0...with:
alter table TABLENAME add index (field0);

Now those same queries run about an average of 1/10th of a sec!! My
question is, is there a negative effect by indexing this field?

Obviously you woudn't index all fields...but could you?


In a world without boundaries why
do we need Gates and Windows?
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 1276

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by woody at nfri dot com | last post: by
1 post views Thread by Matthew Wells | last post: by
1 post views Thread by Average Bear | last post: by
3 posts views Thread by lauren quantrell | last post: by
29 posts views Thread by shmartonak | last post: by
6 posts views Thread by john | last post: by
reply views Thread by tedpottel | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.