# User Column

**URL:** <https://www.ruby-forum.com/t/user-column/192301>\
**Category:** Rails\
**Created:** [July 27, 2010, 11:10pm UTC](https://www.ruby-forum.com/t/user-column/192301 "2010-07-27T23:10:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![badnaam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e36b37/32.png) [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Post date:** [July 27, 2010, 11:10pm UTC](https://www.ruby-forum.com/t/user-column/192301/1 "2010-07-27T23:10:24Z")

</div>

I notice that there is a line in the logs called User Columns (1.3ms)  
[0m [0mSHOW FIELDS FROM `users` [0m, anytime I issue a query  
against a model, even if the queries don’t do anything to the user  
model. This happens even on the console.

Any ideas where this is coming from? Whats the best way to trace which  
part of the code is issuing these queries?

Thanks

---

<div class="post-metadata">

**Author:** ![badnaam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e36b37/32.png) [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Post date:** [July 27, 2010, 11:13pm UTC](https://www.ruby-forum.com/t/user-column/192301/2 "2010-07-27T23:13:20Z")

</div>

On Jul 27, 10:09 pm, badnaam [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I notice that there is a line in the logs called User Columns (1.3ms)  
> [0m [0mSHOW FIELDS FROM `users` [0m, anytime I issue a query  
> against a model, even if the queries don’t do anything to the user  
> model. This happens even on the console.
> 
> Any ideas where this is coming from? Whats the best way to trace which  
> part of the code is issuing these queries?

That rails looking at the structure of your database. In production  
these lookups are cached.

Fred
