Rails database performance issue

Hi

I have a Student table with 30 columns in it.

My question is at what database size, would the query performance be
affected?

We are actually planning to have a ArchivedStudent table(which has
exactly the same structure as that of Student table) so that when
student graduates, his record can be moved out of active Student table
to ArchivedStudent table. or should I just go for named scopes?

It entirely depends on your query. If you are just finding by ID, then
it’s
likely to be in the 7 figure range (10,000,000+).

If you’re doing complex joins and searches within strings, then you’d
need
to test it.

The short answer is test it! It’s easy enough in script/console to
quickly
insert a million rows, then actually test/benchmark your app.

Cheers,

Andy


Andy J.
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840

TechSlam wrote:

Hi

I have a Student table with 30 columns in it.

My question is at what database size, would the query performance be
affected?

Depends on how well, or poorly, crafted the query is? Do you have the
appropriate indexes defined to support your query? There are numerous
factors that will determine the actual performance. A classic “it
depends” question…