UCDaCode
UCDaCode

Reputation: 65

Will deleting data from the MySQL database make it run faster?

I have a database with over 1 million records and it starting to run slow. If I remove most of the data, will it make my database run faster?

Upvotes: 0

Views: 155

Answers (3)

dotoree
dotoree

Reputation: 2993

In a word Yes, but this is not the answer. It depends on your tables schema, indexing and the queries you run. If faster means microseconds or less in performance gain, it doesn't worth it. Try to measure and improve your queries if possible

Upvotes: 0

Pursuit
Pursuit

Reputation: 12345

Usually, 1 million records should not be a lot of data for a database. I would look into your data schema design (tables and indexes) and queries (are you forcing full row scans? Large temp tables?) if it is not running fast enough.

Upvotes: 2

usr
usr

Reputation: 171206

That depends on the type of query you are issuing. It might well do that. Reasons:

  • Less data scanning
  • Less data to keep in cache

Upvotes: 0

Related Questions