# Typos are loading an entire table

**URL:** <https://www.ruby-forum.com/t/typos-are-loading-an-entire-table/206654>\
**Category:** Rails\
**Created:** [May 6, 2011, 5:29pm UTC](https://www.ruby-forum.com/t/typos-are-loading-an-entire-table/206654 "2011-05-06T17:29:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [May 6, 2011, 5:29pm UTC](https://www.ruby-forum.com/t/typos-are-loading-an-entire-table/206654/1 "2011-05-06T17:29:03Z")

</div>

Hello all,

When I have a syntax error accessing my model’s index action the  
server shows an SQL call to load an all of that model. Since there are  
700k+ entries, this always causes a crash.

This ONLY happens the app goes into error catching mode.

I have traced the query to using this method

> **[GitHub - ntalbott/query\_trace: Adds query origin tracing to your logs.](https://github.com/ntalbott/query_trace)**
>
> Adds query origin tracing to your logs. Contribute to ntalbott/query\_trace development by creating an account on GitHub.

and have the following:

> <https://gist.github.com/arjes/959097>

So here is what I found out. On the error page under the “Show env  
dump” link it is inspecting the variables passed to the templates, one  
of which is an Alarm.search(nil) [Meta search] object. This is where  
all of these entries are being loaded from.

How can I prevent the debug page from loading these associations?

Brian
