# 3 to 4 Millions of  records in a single table

**URL:** <https://discuss.rubyonrails.org/t/3-to-4-millions-of-records-in-a-single-table/72298>\
**Category:** rubyonrails-talk\
**Created:** [December 14, 2016, 12:21pm UTC](https://discuss.rubyonrails.org/t/3-to-4-millions-of-records-in-a-single-table/72298 "2016-12-14T12:21:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hanish\_jadala](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hanish\_jadala](https://discuss.rubyonrails.org/u/hanish_jadala)\
**Post date:** [December 14, 2016, 12:21pm UTC](https://discuss.rubyonrails.org/t/3-to-4-millions-of-records-in-a-single-table/72298/1 "2016-12-14T12:21:13Z")

</div>

Hi, If there is millions of record in a single table of mysql db and it is already indexed and having such huge no of records will slow down the process of query. In such cases what are the steps need to take. Kindly give your suggestions.

Thanks In Advance

---

<div class="post-metadata">

**Author:** ![hassan](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/hassan/32/714_2.png) [@hassan](https://discuss.rubyonrails.org/u/hassan)\
**Post date:** [December 14, 2016, 2:49pm UTC](https://discuss.rubyonrails.org/t/3-to-4-millions-of-records-in-a-single-table/72298/2 "2016-12-14T14:49:13Z")

</div>

That's not that many records.

If this question is theoretical it's premature optimization 🙂

If you think you really have a slow query problem, you need to look at the specifics: use mysql's EXPLAIN to examine what your query is actually doing.
