Large select list, speed issues

Rails mailing list
[email protected]

Did you take a look at the logs to see what SQL was being generated,
and what percentage of the time it took to create the db request,
render the page etc?

Try to narrow it down a bit.

On 1/9/06, Dylan M. [email protected] wrote:

right now. There are about 1000 projects. In PHP, the page loaded in about

  • Nic

Rails mailing list
[email protected]

Rails mailing list
[email protected]

I haven’t used it yet, but maybe app/script/performance/profiler will
help you
learn what’s consuming all that time.


Dylan M. wrote:

now. There are about 1000 projects. In PHP, the page loaded in about half a
second, the rails page takes about 4-5 seconds. I tried manually looping and
generating option tags instead of using the select_tag method, but it wasn’t
much better. Any suggestions?

I would suggest you should try adding :select => ‘id, project_name’ to
your find. This way only the id and project_name will be retrieved in
your query, potentially making the instantation of your project records
a lot faster.

– stefan

For rails performance tuning, see:

Rails mailing list
[email protected]

2006/1/12, Dylan M. [email protected]:

That fixed the problem perfectly. Weird that i had a full “SELECT *” in PHP
and it still went fast. Thanks!!

Take a look at your logs, your SELECT might not have been what you
expected it to be (perhaps someJoins you didn’t want?)


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs