Question

I have database1 and database2.

database1 does not use any special Index (rather that PRIMARY KEY indexes on id columns, but database2 has been optimized using proper indexes (some indexes on multiple rows in some tables that have a lot of data).

Suppose that they have the same data. This is for a test.

Now the question is:

When I backup each of the dbs, will database2 be heavier in size than database1 (caused by the size of index files that have been created in database2)?

In other words:

Where is the affect of the large index files seen? Do they affect on database backup size or do they affect something in the internal MySQL server that the database is restored on that (say the server's RAM or CPU usage)?

I hope I've been able to tell you my exact meaning.

Was it helpful?

Solution

Indexes do not significantly increase the size of the database.

However while speed up querying they slow down data manipulation commands, inserts and updates, as the indexes need to be updated for each data change.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top