indexing - MySQL performance gain by reducing index size? -


I have a table that contains ~ 1.2m There are rows. It has 6 column indexes, including URLs in a varchar (255) field.

I should be able to scan the table to see if a URL exists in the table, so there is an index, I wonder if I would get performance benefit by subtracting the index size from about 50 ?

Of course it would mean that it may have to scan more lines while searching URLs in the database. But I only have to do this query once every 30 seconds, so I am thinking I think the small index size will be worth it. Idea -

Less can be better than two reasons - (assuming your index is useful )

1) Indexes are also loaded into memory, so perhaps there is a rare possibility that the size of your index increases to such an extent that it is not completely cacheable in memory. When you will see a performance hit (with all the new hardware specs ... there is hardly any possibility with 1.2M rows, but still noticeable).

2) Many times, only 'N' characters are enough to be able to recognize each record quickly

1) As stated, you may You can never index your key buffer, so why worry.

2) You will first need to define 'N' characters, and after this the performance will be less than or equal to the complete index ... and never. Do you really need to spend time on it? Is it worth the potential loss of accuracy?

Comments