Answer the question
In order to leave comments, you need to log in
How to find out in DataMapper the time during which the SQL server processed my request?
There is a search on my site. I would like to display the time for which the server processed the search request.
If you enable logging
, then in the console I will see what the SQL query was, and the time spent on its executionDataMapper::Logger.new(STDOUT, :debug)
~ (0.251706) SELECT COUNT(*) FROM "wc_lib_items" WHERE (("id" IN (SELECT "id" FROM "wc_lib_items" ORDER BY "id" LIMIT 0) OR NOT((lower(authors) LIKE '%akatova% ' ESCAPE '|'))) AND "published" <= '2015-04-17T20:26:26+03:00')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question