How to check database's queries?

hi, i’m using postgres, is possible to retrieve the database’s queries
for each page without install any plugin ? (and if is not possible,
which plugin do you recommend ?)

On Sun, 2007-01-21 at 00:34 +0100, usser wrote:

hi, i’m using postgres, is possible to retrieve the database’s queries
for each page without install any plugin ? (and if is not possible,
which plugin do you recommend ?)

try log/development.log

matt wrote:

On Sun, 2007-01-21 at 00:34 +0100, usser wrote:

hi, i’m using postgres, is possible to retrieve the database’s queries
for each page without install any plugin ? (and if is not possible,
which plugin do you recommend ?)

try log/development.log

yes, but is not possible to show the queries directly in the view? :frowning:
i think that for this i need a plugin, right?

[another question that isn’t related about this, does exist any method
which tell me how many days, hours, minutes, seconds remain between now
and an input datetime ? i tried with since, but it doesn’t work (stack
level too deep)]

distance_of_time_in_words(@object.created_at, Time.now), for instance.

Take a look at the method source to see how they do it.

http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M000571

about the queries directly in the view, is possible ? i’ve installed
query stats but it doesn’t work :frowning:

usser wrote:

about the queries directly in the view, is possible ? i’ve installed
query stats but it doesn’t work :frowning:

anyone? :frowning:

[email protected] wrote:

distance_of_time_in_words(@object.created_at, Time.now), for instance.

Take a look at the method source to see how they do it.

http://api.rubyonrails.org/classes/ActionView/Helpers/DateHelper.html#M000571

thanks :slight_smile:

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